Re: work_mem greater than 2GB issue

Поиск
Список
Период
Сортировка
От wickro
Тема Re: work_mem greater than 2GB issue
Дата
Msg-id e3febfba-ac85-44aa-8949-9dff53892f85@21g2000vbk.googlegroups.com
обсуждение исходный текст
Ответ на work_mem greater than 2GB issue  (wickro <robwickert@gmail.com>)
Список pgsql-general
> HashAggregate doesn't have any ability to spill to disk.  The planner
> will not select a HashAggregate if it thinks the required hash table
> would be larger than work_mem.  What you've evidently got here is a
> misestimate of the required hash table size, which most likely is
> stemming from a bad estimate of the number of groups.  How does that
> estimate (12617088 here) compare to reality?  Have you tried increasing
> the statistics target for partner_id and keyword (or the whole table)?

Looking at the pg_statistics table the stats for one of the columns
(keyword) is seriously underestimated.
By increasing the stats target to 1000 it gets a bit better but still
underestimated by a a factor of about 10.
I guess that's why postgresql thinks it can fit it all into a hash.

Thanks for the help.

Cheers
Rob


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

Предыдущее
От: Steve Clark
Дата:
Сообщение: Re: easy entry forms on a pg database
Следующее
От: Erik Jones
Дата:
Сообщение: Re: Best way to monitor, control, or rewrite data definition commands?