Re: [HACKERS] No: implied sort with group by

Поиск
Список
Период
Сортировка
От Zeugswetter Andreas DBT
Тема Re: [HACKERS] No: implied sort with group by
Дата
Msg-id 219F68D65015D011A8E000006F8590C6010A51B2@sdexcsrv1.sd.spardat.at
обсуждение исходный текст
Список pgsql-hackers
Ocie wrote:
>> 2.  Instead of sorting the tuples before grouping, add a hashing
system to
>> the group node so that the pre-sorting is not necessary.
>The hash should work.  If the hash key is built on the group-by items,
>then any row with the same entries in these columns will get hashed to
>the same result row.  At this point, it should be fairly easy to
>perform aggregation (test and substitute for min and max, add for
>sum,avg, etc).

Have been thinking about that too. Is each list in the current hash
implementation sorted ?
Cause else how do you know, that a certain value has not already been
processed ?
Answer: keep a list of already processed groups in memory. Initialize it
for each new hash list.

Andreas

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

Предыдущее
От: "Igor Sysoev"
Дата:
Сообщение: time stamps in logging
Следующее
От: Andrew Martin
Дата:
Сообщение: Re: [HACKERS] No: implied sort with group by