Re: [HACKERS] Parallel Aggregation support for aggregate functionsthat use transitions not implemented for array_agg

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: [HACKERS] Parallel Aggregation support for aggregate functionsthat use transitions not implemented for array_agg
Дата
Msg-id 20170607040613.y23jt5n7hfwm4suz@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: [HACKERS] Parallel Aggregation support for aggregate functions that use transitions not implemented for array_agg  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 2017-06-07 00:03:15 -0400, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
> > On 2017-06-06 23:32:53 -0400, Peter Eisentraut wrote:
> >> I'm not sure how you would parallelize these, since in most uses you
> >> want to have a deterministic output order.
> 
> > Unless you specify ORDER BY you don't really have that anyway, consider
> > hash-aggregation.  If you want deterministic order, you really need an
> > ORDER BY inside the aggregate.
> 
> Hash aggregation does not destroy the property that array_agg/string_agg
> will produce results whose components appear in the order that the
> subquery emitted them in.  It only causes the various aggregate results
> in a GROUP BY query to themselves appear in random order.

Whoa, I obviously should stop working tonight.  I think it's still a
hugely useful to parallelize such aggregates - it might be worthwhile to
have two versions of array_agg, one with a serial/combinefunc and one
without...

Greetings,

Andres Freund



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Parallel Aggregation support for aggregate functions that use transitions not implemented for array_agg
Следующее
От: amul sul
Дата:
Сообщение: Re: [HACKERS] Adding support for Default partition in partitioning