Re: vacuumdb

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Mark <sendmailtomark(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: vacuumdb
Date: 2004-12-11 19:39:30
Message-ID: 20041211193930.GC2668@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Dec 08, 2004 at 09:45:53 -0800,
Mark <sendmailtomark(at)yahoo(dot)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.

In response to

  • vacuumdb at 2004-12-08 17:45:53 from Mark

Browse pgsql-general by date

  From Date Subject
Next Message Lada 'Ray' Lostak 2004-12-11 19:40:18 Re: Sql performace - why soo long ?
Previous Message Bruno Wolff III 2004-12-11 19:32:40 Re: question: how to preload data and excute table creation scripts