Tom Lane wrote:
> Alvaro Herrera <> writes:

> > I can't imagine that the server is avoiding hash aggregation on a 1MB
> > work_mem limit for data that's a few dozen of bytes.  Is it really doing
> > that?
> Yup:

Aha.  Thanks for testing.

> Now that you mention it, this does seem a bit odd, although I remember
> that there's a pretty substantial fudge factor in there when we have
> no statistics (which we don't in this example).  If I ANALYZE ctv_data
> then it sticks to the hashagg plan all the way down to 64kB work_mem.

Hmm, so we could solve the complaint by adding an ANALYZE.  I'm open to
that; other opinions?

Álvaro Herrera      
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Sent via pgsql-hackers mailing list (
To make changes to your subscription:

Reply via email to