Re: Updating histogram_bounds after a delete

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: Updating histogram_bounds after a delete
Дата
Msg-id 4D80EBAB020000250003B9DE@gw.wicourts.gov
обсуждение исходный текст
Ответ на Updating histogram_bounds after a delete  (Derrick Rice <derrick.rice@gmail.com>)
Ответы Re: Updating histogram_bounds after a delete
Список pgsql-performance
Derrick Rice <derrick.rice@gmail.com> wrote:

> I recently ran into a problem with a planner opting for a
> sequential scan rather than a bitmap heap scan because the stats
> suggested that my delete query was going to affect 33% of the
> rows, rather than the 1% it really was.

> could possibly react by updating the histogram_bounds at
> commit-time, rather than needing an additional analyze or needing
> auto-analyze settings jacked way up.

I recommend you try version 9.0 with default autovacuum settings and
see how things go.  If you still have an issue, let's talk then.
Besides numerous autovacuum improvements, which make it more
reliable and less likely to noticeably affect runtime of your
queries, there is a feature to probe the end of an index's range in
situations where data skew was often causing less than optimal plans
to be chosen.

From what you've told us, I suspect you won't see this problem in
9.0 unless you shoot yourself in the foot by crippling autovacuum.

-Kevin

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

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: Re: Adding additional index causes 20,000x slowdown for certain select queries - postgres 9.0.3
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: pg_xlog size