Re: Shouldn't we have a way to avoid "risky" plans?

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: Shouldn't we have a way to avoid "risky" plans?
Дата
Msg-id 4DAE3BF0.2060806@agliodbs.com
обсуждение исходный текст
Ответ на Re: Shouldn't we have a way to avoid "risky" plans?  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Shouldn't we have a way to avoid "risky" plans?  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-performance
On 4/19/11 7:29 AM, Robert Haas wrote:
> Another thought is that we might want to consider reducing
> autovacuum_analyze_scale_factor.  The root of the original problem
> seems to be that the table had some data churn but not enough to cause
> an ANALYZE.  Now, if the data churn is random, auto-analyzing after
> 10% churn might be reasonable, but a lot of data churn is non-random,
> and ANALYZE is fairly cheap.

I wouldn't reduce the defaults for PostgreSQL; this is something you do
on specific tables.

For example, on very large tables I've been known to set
analyze_scale_factor to 0 and analyze_threshold to 5000.

And don't assume that analyzing is always cheap.  If you have an 800GB
table, most of which is very cold data, and have statistics set to 5000
for some columns, accessing many of the older blocks could take a while.

--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com

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

Предыдущее
От: philippe
Дата:
Сообщение: Re: How to configure a read-only database server?
Следующее
От: Joby Joba
Дата:
Сообщение: Re: Two different execution plans for similar requests