Re: autovacuum blues - Mailing list pgsql-general

From Anton Melser
Subject Re: autovacuum blues
Date
Msg-id 92d3a4950611091344l21762f4bmb5390baad8f41f3f@mail.gmail.com
Whole thread Raw
In response to Re: autovacuum blues  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: autovacuum blues  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-general
On 09/11/06, Alvaro Herrera <alvherre@commandprompt.com> wrote:
> Anton Melser wrote:
>
> > Thanks for that. Just a clarification, can someone tell me what the
> > "number of tuples" means in the context of the multipliers? I mean,
> > when the vacuum min multiplier is at 0.4, we multiply 0.4 by what? I
> > get the min val, but what are we multiplying by 0.4? The total number
> > of tuples in the table? The total modified/deleted?
>
> pg_class.reltuples

And so...

For efficiency reasons, reltuples and relpages are not updated
on-the-fly, and so they usually contain somewhat out-of-date values.
They are updated by VACUUM, ANALYZE, and a few DDL commands such as
CREATE INDEX. A stand-alone ANALYZE, that is one not part of VACUUM,
generates an approximate reltuples value since it does not read every
row of the table. The planner will scale the values it finds in
pg_class to match the current physical table size, thus obtaining a
closer approximation.

So I am still a little unclear... I need to analyse to get relevant
stats for autovacuum... but autovacuum needs to be used to update the
relevant stats? Can I REALLY do without a cronjob, or am I just
thinking wishfully (I can invent expressions if I want!).
Cheers
Antoine

pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: Can non-superuser install c functions ?
Next
From: Alvaro Herrera
Date:
Subject: Re: autovacuum blues