Re: postmaster consuming /lots/ of memory with hash aggregate. why?

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: postmaster consuming /lots/ of memory with hash aggregate. why?
Дата
Msg-id AANLkTiktPOkSTXk7frMVjOdUd8ojGhdUT0aWB4PH9ak5@mail.gmail.com
обсуждение исходный текст
Ответ на Re: postmaster consuming /lots/ of memory with hash aggregate. why?  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-performance
On Fri, Nov 12, 2010 at 11:12 AM, Pavel Stehule <pavel.stehule@gmail.com> wrote:
> if I remember well, you can set a number of group by ALTER TABLE ALTER
> COLUMN SET n_distinct = ..
>
> maybe you use it.

I'm not sure where the number 40,000 is coming from either, but I
think Pavel's suggestion is a good one.  If you're grouping on a
column with N distinct values, then it stands to reason there will be
N groups, and the planner is known to estimate n_distinct on large
tables, even with very high statistics targets, which is why 9.0
allows a manual override.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

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

Предыдущее
От: Ivan Voras
Дата:
Сообщение: Re: Performance under contention
Следующее
От: Vitalii Tymchyshyn
Дата:
Сообщение: Re: Performance under contention