From: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | Simon Riggs <simon(at)2ndQuadrant(dot)com>, David Fetter <david(at)fetter(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Autovacuum and Autoanalyze |
Date: | 2008-09-17 14:36:46 |
Message-ID: | 48D115FE.6050305@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Alvaro Herrera wrote:
> Simon Riggs wrote:
>> On Wed, 2008-09-17 at 10:09 +0300, Heikki Linnakangas wrote:
>>> Isn't autoanalyze a waste of time during a bulk load? Seems better to
>>> run ANALYZE manually at the end.
>> Its not a waste of time because it catches tables immediately they have
>> been loaded, not just at the end of the bulk load. Running ANALYZE is a
>> waste of time if autoanalyze has already caught it, which is why that's
>> never been added onto the end of a pg_dump script. But currently this is
>> true only when we have both autoVACUUM and autoANALYZE enabled.
>
> Hmm, one of the first complaints about defaulting autovacuum to on was
> that it made restores so much longer *because* it was choosing to do
> autoanalyzes on the tables as they were imported. It was then that the
> auto-cancel mechanism was introduced.
>
> http://pgsql.markmail.org/message/rqyjkafuw43426xy
>
> Why doesn't this new request conflict with that one?
The problem back then was that a CREATE INDEX was waiting on the
autoanalyze to finish, and the autoanalyze took a long time to finish
because of vacuum_cost_delay. Now that we have the auto-cancel
mechanism, that's not a problem.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Chernow | 2008-09-17 14:37:37 | Re: [PATCHES] libpq events patch (with sgml docs) |
Previous Message | Stephen Frost | 2008-09-17 14:32:22 | Re: Column level privileges was:(Re: Extending grant insert on tables to sequences) |