Re: Spilling hashed SetOps and aggregates to disk

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: Spilling hashed SetOps and aggregates to disk
Дата
Msg-id 1529611461.3820.55.camel@j-davis.com
обсуждение исходный текст
Ответ на Re: Spilling hashed SetOps and aggregates to disk  (David Gershuni <dgershun@cs.cmu.edu>)
Ответы Re: Spilling hashed SetOps and aggregates to disk  (David Gershuni <dgershun@cs.cmu.edu>)
Список pgsql-hackers
On Thu, 2018-06-21 at 11:04 -0700, David Gershuni wrote:
> This approach seems functionally correct, but I don't like the idea
> of
> transforming O(N) tuples of disk I/O into O(S*N) tuples of disk I/O
> (in the worst case).

It's the same amount of I/O as the idea you suggested as putting the
hash tables into separate phases, but it may consume more disk space at
once in the worst case.

We can mitigate that if it becomes a problem later.

> b) is accomplished by not sorting groups by their actual grouping
> keys, but
> instead sorting by their hash values. This works because we don't
> need a 
> true sort. We just need to process identical groups in a consistent
> order
> during the merge step. As long as we're careful about collisions
> during the
> merge, this should work.

Can you expand on how we should handle collisions? If all we can do is
hash and compare equality, then it seems complex to draw group
boundaries.

Regards,
    Jeff Davis



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: PSA: --enable-coverage interferes with parallel query scheduling
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: XML/XPath issues: text/CDATA in XMLTABLE, XPath evaluated withwrong context