Re: Autovaccum

From: Shane Ambler <pgsql(at)007Marketing(dot)com>
To: Ezequias Rodrigues da Rocha <ezequias(dot)rocha(at)gmail(dot)com>, pgsql-sql(at)postgresql(dot)org, alvherre(at)commandprompt(dot)com
Subject: Re: Autovaccum
Date: 2006-11-30 15:10:53
Message-ID: 456EF47D.1010800@007Marketing.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Alvaro Herrera wrote:
> Ezequias Rodrigues da Rocha wrote:
>> Hi list,
>>
>> I would like to know if it is necessary to set my database to
>> autovaccum if the intent of my DB Manager is do not make any deletion
>> in any time.
>>
>> If there is no deletions why autovaccum ok ?
>
> You need to vacuum from time to time anyway, even if you don't delete
> anything. The easiest way to do it is let autovacuum do it for you.
>

One thing that vacuum/autovacuum does is mark space used by deleted rows
to be reused. Without deletes this won't be necessary in table data
files. But when you update a record an index may also be updated and
have the same effect within the index storage space.

There are other things that vacuum does to keep your database running
optimally. One is to update planner statistics about how many rows are
in each table which effects the query planning and optimizing.

Without deletes a plain vacuum won't achieve a great deal, but a regular
VACUUM ANALYZE (as done by autovacuum) will make a difference to the
performance of your database.

If no data in your db changes then you won't have to bother vacuuming.

--

Shane Ambler
pgSQL(at)007Marketing(dot)com

Get Sheeky @ http://Sheeky.Biz

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Travis Whitton 2006-11-30 15:50:46 pg_xlog on separate drive
Previous Message Ezequias Rodrigues da Rocha 2006-11-30 15:03:41 Re: Autovaccum