Re: memory usage of group by select

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: memory usage of group by select
Дата
Msg-id 20587.1262124241@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: memory usage of group by select  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-general
Alvaro Herrera <alvherre@commandprompt.com> writes:
> It's expecting 85k distinct groups.  If that's not accurate, then
> HashAggregate would use more memory than expected.  See if you can make
> it work by setting enable_hashagg = off.

> If that works, good -- the real solution is different.  Maybe you need
> to ANALYZE more, or increase the size of the stats bin for this column.

If ANALYZE consistently underestimates the number of distinct values,
you may have to force matters with ALTER TABLE SET STATISTICS DISTINCT.

            regards, tom lane

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: memory usage of group by select
Следующее
От: Anthony
Дата:
Сообщение: Re: memory usage of group by select