Re: The Future of Aggregation

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: The Future of Aggregation
Дата
Msg-id 20150609152721.GA18593@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: The Future of Aggregation  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Ответы Re: The Future of Aggregation
Список pgsql-hackers
On 2015-06-09 17:19:33 +0200, Tomas Vondra wrote:
> ... and yet another use case for 'aggregate state combine' that I just
> remembered about is grouping sets. What GROUPING SET (ROLLUP, ...) do
> currently is repeatedly sorting the input, once for each grouping.

Actually, that's not really what happens. All aggregates that share a
sort order are computed in parallel. Only when sets do not share an
order additional sorts are required.

> What
> could happen in some cases is building the most detailed aggregation first,
> then repeatedly combine these partial states.

I'm not sure that'll routinely be beneficial, because it'd require
keeping track of all the individual "most detailed" results, no?

Greetings,

Andres Freund



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: The Future of Aggregation
Следующее
От: Andres Freund
Дата:
Сообщение: Re: "could not adopt C locale" failure at startup on Windows