"Y Sidhu" <ysidhu@gmail.com> writes:
> it may be table fragmentation. What kind of tables? We have 2 of them which
> experience lots of adds and deletes only. No updates. So a typical day
> experiences record adds a few dozen times on the order of 2.5 million. And
> deletes once daily. Each of these tables has about 3 btree indexes.
With an arrangement like that you should vacuum once daily, shortly
after the deletes --- there's really no point in doing it on any other
schedule. Note "shortly" not "immediately" --- you want to be sure that
any transactions old enough to see the deleted rows have ended.
regards, tom lane