From: | Zeugswetter Andreas DBT <Andreas(dot)Zeugswetter(at)telecom(dot)at> |
---|---|
To: | "'pgsql-hackers(at)hub(dot)org'" <pgsql-hackers(at)hub(dot)org> |
Subject: | Re: [HACKERS] No: implied sort with group by |
Date: | 1998-01-29 10:23:15 |
Message-ID: | 219F68D65015D011A8E000006F8590C6010A51B2@sdexcsrv1.sd.spardat.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Martin | 1998-01-29 10:43:34 | Re: [HACKERS] No: implied sort with group by |
Previous Message | Igor Sysoev | 1998-01-29 09:51:10 | time stamps in logging |