Re: Hash grouping, aggregates - Mailing list pgsql-hackers

From Bruno Wolff III
Subject Re: Hash grouping, aggregates
Date
Msg-id 20030211152828.GA31840@wolff.to
Whole thread Raw
In response to Hash grouping, aggregates  (Greg Stark <gsstark@mit.edu>)
Responses Re: Hash grouping, aggregates
List pgsql-hackers
On Tue, Feb 11, 2003 at 09:48:11 -0500, Greg Stark <gsstark@mit.edu> wrote:
> 
> 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.

This is already in 7.4. You could try it out by building from CVS.
From the HISTORY file:
System can use either hash- or sort-based strategy for grouped       aggregation


pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Hash grouping, aggregates
Next
From: Greg Stark
Date:
Subject: Re: Hash grouping, aggregates