Re: A better way than tweaking NTUP_PER_BUCKET

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Atri Sharma <atri(dot)jiit(at)gmail(dot)com>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: A better way than tweaking NTUP_PER_BUCKET
Date: 2014-01-25 22:02:21
Message-ID: 20140125220221.GR31026@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

* Bruce Momjian (bruce(at)momjian(dot)us) wrote:
> Uh, were are we on this? Is it a TODO?

I've been strongly considering my previous patch which tweaked
NTUP_PER_BUCKET to '1' (instead of the default '10') when there's
sufficient work_mem for it. There was recently another complaint on IRC
about our tendency to hash the larger partition rather than the smaller
one which I believe would be resolved by doing so.

The main thing holding me back has been concern that there may be cases
which perform worse with the change, either because hashing the larger
partition actually ended up being faster or due to the increase in
memory usage.

In the end, I believe we absolutely should do something about this.
Hashing a 64M-row table (requiring upwards of 8G) instead of hashing
a 2M-row table is really bad of us.

Thoughts?

Thanks,

Stephen

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Florian Pflug 2014-01-25 22:02:36 Re: [PATCH] Negative Transition Aggregate Functions (WIP)
Previous Message Tom Lane 2014-01-25 21:56:37 Re: A minor correction in comment in heaptuple.c