Re: slow query - Mailing list pgsql-performance

From Robert Treat
Subject Re: slow query
Date
Msg-id 1046111434.1014.165.camel@camel
Whole thread Raw
In response to Re: slow query  (Clarence Gardner <clarence@silcom.com>)
Responses Re: slow query  (Josh Berkus <josh@agliodbs.com>)
List pgsql-performance
On Mon, 2003-02-24 at 12:27, Clarence Gardner wrote:
> On 24 Feb 2003, Robert Treat wrote:
>
> >
> > If your seeing wildly dramatic improvments from vacuum full, you might
> > want to look into running regular vacuums more often (especially for
> > high turnover tables), increase your max_fsm_relations to 1000, and
> > increasing your max_fsm_pages.
>
> I don't know about the settings you mention, but a frequent vacuum
> does not at all obviate a vacuum full. My database is vacuumed every
> night, but a while ago I found that a vacuum full changed a simple
> single-table query from well over 30 seconds to one or two. We now
> do a vacuum full every night.
>

Actually if you are vacuuming frequently enough, it can (and should*)
obviate a vacuum full. Be aware that frequently enough might mean really
frequent, for instance I have several tables in my database that update
every row within a 15 minute timeframe, so I run a "lazy" vacuum on
these tables every 10 minutes. This allows postgresql to reuse the space
for these tables almost continuously so I never have to vacuum full
them.

(* this assumes your max_fsm_pages/relations settings are set correctly)

Robert Treat



pgsql-performance by date:

Previous
From: Josh Berkus
Date:
Subject: Memory taken by FSM_relations
Next
From: Josh Berkus
Date:
Subject: Re: slow query