Re: Spilling hashed SetOps and aggregates to disk

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: Spilling hashed SetOps and aggregates to disk
Дата
Msg-id 1528175936.2742.8.camel@j-davis.com
обсуждение исходный текст
Ответ на Re: Spilling hashed SetOps and aggregates to disk  (Andres Freund <andres@anarazel.de>)
Ответы Re: Spilling hashed SetOps and aggregates to disk  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Mon, 2018-06-04 at 11:52 -0700, Andres Freund wrote:
> I wonder whether, at least for aggregates, the better fix wouldn't be
> to
> switch to feeding the tuples into tuplesort upon memory exhaustion
> and
> doing a sort based aggregate.  We have most of the infrastructure to
> do

That's an interesting idea, but it seems simpler to stick to hashing
rather than using a combination strategy. It also seems like it would
take less CPU effort.

What advantages do you have in mind? My patch partitions the spilled
data, so it should have similar disk costs as a sort approach.

Regards,
    Jeff Davis



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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: Spilling hashed SetOps and aggregates to disk
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: libpq compression