Re: pg_stats how-to? - Mailing list pgsql-performance

From Tom Lane
Subject Re: pg_stats how-to?
Date
Msg-id 1623.1179188449@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_stats how-to?  ("Y Sidhu" <ysidhu@gmail.com>)
Responses Re: pg_stats how-to?  ("Jim C. Nasby" <decibel@decibel.org>)
List pgsql-performance
"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

pgsql-performance by date:

Previous
From: "Y Sidhu"
Date:
Subject: Re: pg_stats how-to?
Next
From: Tarhon-Onu Victor
Date:
Subject: Re: 500 requests per second