Re: Analyze and vacuum, they are sort of mandatory....

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Analyze and vacuum, they are sort of mandatory....
Дата
Msg-id 17016.1139761083@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Analyze and vacuum, they are sort of mandatory....  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: Analyze and vacuum, they are sort of mandatory....  ("Jim Buttafuoco" <jim@contactbda.com>)
Список pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> Yes, that is what autovacuum does.  It detects changes in the database 
> and runs analyze if failing to do so would cause PostgreSQL to behave 
> badly.  I don't know why it's not turned on by default.

Conservatism.  It may well be on by default in some future release,
but that's not happening in the first release where the code exists
at all.

autovacuum isn't a 100% solution to the sort of problems Mark is
complaining about anyway: on a freshly-loaded table you could get bad
plans because autovacuum hadn't gotten to it yet.

One thing we could consider doing is boosting up the default no-stats
assumption about the number of distinct values in a column, to the point
where the planner wouldn't try a hash aggregate unless it had actual
stats.  However, I'm unsure what negative side-effects that might have.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: SpeedComparison
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Scrollable cursors and Sort performance