From: | Greg Stark <gsstark(at)mit(dot)edu> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Hash grouping, aggregates |
Date: | 2003-02-11 14:48:11 |
Message-ID: | 87n0l2rhzo.fsf@stark.dyndns.tv |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
So one of the items on the TODO list is "Add hash for evaluating GROUP BY
aggregates (Tom)"
I'm finding this would benefit a lot of my queries. Most of the time seems to
be going into sorts for group by clauses. I don't know how long it would take
to build a hash of course, but I suspect it would be less than the sort.
Is this something a beginner could figure out? I'm thinking I need a normal
Hash node that builds exactly the same kind of hash as a join, then a HashScan
node that picks all the rows out of the hash.
The neat thing is that hash aggregates would allow grouping on data types that
have = operators but no useful < operator.
(Incidentally, I'm fond of "nested loop", I remember when I was a beginner SQL
programmer looking at plans and it was intuitively obvious what it meant. I
suspect for a beginner looking at "nestloop" it might not be quite so
obvious.)
--
greg
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Stark | 2003-02-11 15:18:32 | Re: Hash grouping, aggregates |
Previous Message | Greg Copeland | 2003-02-11 14:47:02 | Re: [HACKERS] PostgreSQL Benchmarks |