Re: Large Scale Aggregation (HashAgg Enhancement) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Large Scale Aggregation (HashAgg Enhancement)
Date
Msg-id 24575.1137475758@sss.pgh.pa.us
Whole thread Raw
In response to Re: Large Scale Aggregation (HashAgg Enhancement)  (Greg Stark <gsstark@mit.edu>)
List pgsql-hackers
Greg Stark <gsstark@mit.edu> writes:
> For a hash aggregate would it be possible to rescan the original table
> instead of spilling to temporary files?

Sure, but the possible performance gain is finite and the possible
performance loss is not.  The "original table" could be an extremely
expensive join.  We'd like to think that the planner gets the input size
estimate approximately right and so the amount of extra I/O caused by
hash table resizing should normally be minimal.  The cases where it is
not right are *especially* not likely to be a trivial table scan as you
are supposing.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: source documentation tool doxygen
Next
From: Simon Riggs
Date:
Subject: Re: Large Scale Aggregation (HashAgg Enhancement)