pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: Matt Clark <matt@ymogen.net>
To: pgsql-performance@postgresql.org
Subject: Re: Is there a reason _not_ to vacuum continuously?
Date: Wed, 17 Sep 2003 13:13:31 -0700
Message-ID: <200309171313.31078.josh@agliodbs.com> (raw)
In-Reply-To: <LFEIJBEOKGPDHCEMDGNFCECFCDAA.matt@ymogen.net>
References: <LFEIJBEOKGPDHCEMDGNFCECFCDAA.matt@ymogen.net>

Matt,

> Is there any reason for me not to run continuous sequential vacuum analyzes?
> At least for the 6 tables that see a lot of updates?

No.  You've already proven that the performance gain on queries offsets the 
loss from the vacuuming.   There is no other "gotcha".   

However: 
1) You may be able to decrease the required frequency of vacuums by adjusting 
your FSM_relations parameter.  Have you played with this at all?  The default 
is very low.
2) Are you sure that ANALYZE is needed?   Vacuum is required whenever lots of 
rows are updated, but analyze is needed only when the *distribution* of 
values changes significantly.
3) using PG 7.3 or less, you will also need to REINDEX these tables+indexes 
often (daily?).   This issue will go away in 7.4, which should make you an 
early adopter of 7.4.

> I hear 10% of tuples updated as a good time to vac-an, but does my typical
> count of 3 indexes per table affect that?

Not until 7.4.

-- 
-Josh Berkus
 Aglio Database Solutions
 San Francisco




view thread (14+ messages)  latest in thread

Message-ID: <200309171313.31078.josh@agliodbs.com>
Permalink:  ../200309171313.31078.josh@agliodbs.com/
Also on:    postgresql.org/message-id/200309171313.31078.josh@agliodbs.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: josh@agliodbs.com, matt@ymogen.net
  Subject: Re: Is there a reason _not_ to vacuum continuously?
  In-Reply-To: <200309171313.31078.josh@agliodbs.com>
  References: <LFEIJBEOKGPDHCEMDGNFCECFCDAA.matt@ymogen.net> <200309171313.31078.josh@agliodbs.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox