Re: Autovaccum

From: Shane Ambler <pgsql(at)007Marketing(dot)com>
To: Ezequias Rodrigues da Rocha <ezequias(dot)rocha(at)gmail(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Autovaccum
Date: 2006-12-01 17:06:09
Message-ID: 45706101.8040909@007Marketing.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Ezequias Rodrigues da Rocha wrote:
> Could you tell me if only this both options are ok (attach) ?
>
> If I don't mark the interval of vacuuns what will be the interval of
> each vacuum ?

The default settings may be fine for you, it depends a bit on how many
insert/updates you get in a given time frame.

http://www.postgresql.org/docs/8.1/interactive/runtime-config-autovacuum.html
will give a definition of each parameter that can be set.

http://www.postgresql.org/docs/8.1/interactive/maintenance.html#AUTOVACUUM
will explain in more detail.

Basically every autovacuum_naptime seconds autovacuum looks at estimates
of how much the database has changed since the last run. If the amount
of change is greater than the thresholds determined from the other
settings then a vacuum/analyze will be done.

If you have 100 records added/updated per day then you may only need it
to run 1 or 2 times a day using smaller thresholds.

If you are adding 10,000 records an hour then you will want it to run
more often.

> 2006/11/30, Shane Ambler <pgsql(at)007marketing(dot)com>:
>> 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
>>
>
>

--

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

Get Sheeky @ http://Sheeky.Biz

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2006-12-01 17:47:43 Re: calling elog possibly causing problem in DirectFunctionCall1
Previous Message Rajesh Kumar Mallah 2006-12-01 16:40:50 calling elog possibly causing problem in DirectFunctionCall1