Re: vacuumdb - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: vacuumdb
Date
Msg-id 20041211193930.GC2668@wolff.to
Whole thread Raw
In response to vacuumdb  (Mark <sendmailtomark@yahoo.com>)
List pgsql-general
On Wed, Dec 08, 2004 at 09:45:53 -0800,
  Mark <sendmailtomark@yahoo.com> wrote:
> Hi,
> What are recommendations about running vacuumdb?

You need to VACUUM tables to reclaim space created by DELETE and UPDATE
commands. You need to run ANALYZE tables when their distribution of
data changes. If you are doing a VACUUM, you usually want to ANALYZE
at the same time, but you may want to do separate ANALYZEs if you
do lots of INSERTs compared to DELETEs and UPDATEs.

> How frequently it need be executed and how will I know I have to run
> it.

That depends on your application.

> Can I run vaccumdb on production system or I need to do it on DB with
> no users connected?

You can run on production, but this can be a problem if your disk bandwidth
is already saturated when you run the vacuum.

You can also look at the pg_autovacuum contrib package that is included
with recent versions of postgres.

pgsql-general by date:

Previous
From: David Fetter
Date:
Subject: Re: What's faster
Next
From: "Lada 'Ray' Lostak"
Date:
Subject: Re: Sql performace - why soo long ?