Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-sql by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group