From: Bruno Wolff III <bruno@wolff.to>
To: Michael Mattox <michael.mattox@verideon.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Vacuum strategies
Date: Thu, 29 May 2003 06:27:54 -0500
Message-ID: <20030529112754.GE11002@wolff.to> (raw)
In-Reply-To: <CJEBLDCHAADCLAGIGCOOKEDNCIAA.michael.mattox@verideon.com>
References: <CJEBLDCHAADCLAGIGCOOKEDNCIAA.michael.mattox@verideon.com>
On Thu, May 29, 2003 at 12:21:44 +0200,
Michael Mattox <michael.mattox@verideon.com> wrote:
> When I run vacuum (I usually do "vacuum full verbose analyze"), I get a
> message saying vacuum should only be performed when no one is using the
> database. My database is used for a website which is active 24 hours a day,
> so I'm curious what kind of vacuum strategy I should use? Should I shut
> down the website to vacuum or should I just schedule the vacuum to run in
> the middle of the night? So far I've been doing it while the website is
> running without any problems.
Vacuum full exclusively locks tables and can hurt performance if
tables are big. If you are running 7.3, you normally won't need to
run vacuum full. Vacuum should be run when a significant fraction of
rows in a table have been deleted or updated or at least every
10^9 transactions. Analyse needs to be run after inserts, updates
or deletes have significantly impacted the statistics for a table.
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-admin@postgresql.org
Cc: bruno@wolff.to, michael.mattox@verideon.com
Subject: Re: Vacuum strategies
In-Reply-To: <20030529112754.GE11002@wolff.to>
References: <CJEBLDCHAADCLAGIGCOOKEDNCIAA.michael.mattox@verideon.com> <20030529112754.GE11002@wolff.to>
* 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