Re: Group-count estimation statistics

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: Greg Stark <gsstark(at)mit(dot)edu>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Group-count estimation statistics
Date: 2005-01-28 21:41:16
Message-ID: 26465.1106948476@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Kris Jurka <books(at)ejurka(dot)com> writes:
> The proposed change biases towards a hash plan which has no provision for
> spilling to disk. Slow is one thing, but excessive memory usage and
> possibly failing is another thing.

Keep in mind that we are replacing 7.4 code that had a serious tendency
to select hash plans when it really shouldn't, because of underestimated
table sizes. Now that we have the physical-size-driven estimate of
table rowcounts, I think we've gone too far over in the other direction.

Which is not to say that spill-to-disk logic wouldn't be a nice thing to
add, but I'm not going to panic about its not being there today. 7.4
presented a much greater hazard than we have now, but we got through
that cycle without a large number of complaints. There's always the
enable_hashagg switch if you really find yourself backed into a corner.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-01-28 21:45:53 Re: -HEAD on FreeBSD 6-CURRENT build failures
Previous Message Merlin Moncure 2005-01-28 21:36:05 Re: Allow GRANT/REVOKE permissions to be applied to all schema objects with one command