Re: [HACKERS] Autovacuum and Autoanalyze

2008-09-17 Thread Robert Haas
> I tend to agree with Alvaro that there's not very much of a use case for > an analyze-only autovacuum mode. Assuming that we get to the point of > having a parallelizing pg_restore, it would be interesting to give it an > option to include ANALYZE for each table it's loaded among the tasks > tha

Re: [HACKERS] Autovacuum and Autoanalyze

2008-09-17 Thread Simon Riggs
On Wed, 2008-09-17 at 10:52 -0400, Tom Lane wrote: > Heikki Linnakangas <[EMAIL PROTECTED]> writes: > > Alvaro Herrera wrote: > >> 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 autoana

Re: [HACKERS] Autovacuum and Autoanalyze

2008-09-17 Thread Tom Lane
Heikki Linnakangas <[EMAIL PROTECTED]> writes: > Alvaro Herrera wrote: >> 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

Re: [HACKERS] Autovacuum and Autoanalyze

2008-09-17 Thread Heikki Linnakangas
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

Re: [HACKERS] Autovacuum and Autoanalyze

2008-09-17 Thread Alvaro Herrera
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

Re: [HACKERS] Autovacuum and Autoanalyze

2008-09-17 Thread Simon Riggs
On Wed, 2008-09-17 at 10:09 +0300, Heikki Linnakangas wrote: > David Fetter wrote: > > On Tue, Sep 16, 2008 at 08:59:08PM -0400, Alvaro Herrera wrote: > >> Simon Riggs wrote: > >>> Disabling autovacuum can have catastrophic effects, since it disables > >>> the ANALYZing of tables. > >>> > >>> Can

Re: [HACKERS] Autovacuum and Autoanalyze

2008-09-17 Thread Heikki Linnakangas
David Fetter wrote: On Tue, Sep 16, 2008 at 08:59:08PM -0400, Alvaro Herrera wrote: Simon Riggs wrote: Disabling autovacuum can have catastrophic effects, since it disables the ANALYZing of tables. Can we have a mode where we disable autoVACUUM yet enable autoANALYZE? You mean something like

Re: [HACKERS] Autovacuum and Autoanalyze

2008-09-16 Thread David Fetter
On Tue, Sep 16, 2008 at 08:59:08PM -0400, Alvaro Herrera wrote: > Simon Riggs wrote: > > Disabling autovacuum can have catastrophic effects, since it disables > > the ANALYZing of tables. > > > > Can we have a mode where we disable autoVACUUM yet enable autoANALYZE? > > You mean something like >

Re: [HACKERS] Autovacuum and Autoanalyze

2008-09-16 Thread Alvaro Herrera
Simon Riggs wrote: > Disabling autovacuum can have catastrophic effects, since it disables > the ANALYZing of tables. > > Can we have a mode where we disable autoVACUUM yet enable autoANALYZE? You mean something like autovacuum = on / off / analyze ? We can certainly do that, but is there buy-in

Re: [HACKERS] Autovacuum and Autoanalyze

2008-09-16 Thread Robert Haas
> Please provide some specifics. It's been a very long time since the > planner was completely unaware of the size of such a table. Lack of > stats is certainly a handicap, but I'm not convinced it should result > in horrible plans. Maybe a more appropriate answer to this type of > issue is to t

Re: [HACKERS] Autovacuum and Autoanalyze

2008-09-16 Thread Tom Lane
"Robert Haas" <[EMAIL PROTECTED]> writes: > This seems like the wrong solution. There is a general problem that > bulk data loads on an empty table tend to result in horrible query > plans, Please provide some specifics. It's been a very long time since the planner was completely unaware of the

Re: [HACKERS] Autovacuum and Autoanalyze

2008-09-16 Thread Robert Haas
> Disabling autovacuum can have catastrophic effects, since it disables > the ANALYZing of tables. > > Can we have a mode where we disable autoVACUUM yet enable autoANALYZE? > > ANALYZE times are fairly bounded because of the way we do sampling. > VACUUM times are not bounded at all, and typically

[HACKERS] Autovacuum and Autoanalyze

2008-09-15 Thread Simon Riggs
Disabling autovacuum can have catastrophic effects, since it disables the ANALYZing of tables. Can we have a mode where we disable autoVACUUM yet enable autoANALYZE? ANALYZE times are fairly bounded because of the way we do sampling. VACUUM times are not bounded at all, and typically > O(n). So i