Re: A better way than tweaking NTUP_PER_BUCKET - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: A better way than tweaking NTUP_PER_BUCKET
Date
Msg-id 51C6125E.3090806@vmware.com
Whole thread Raw
In response to Re: A better way than tweaking NTUP_PER_BUCKET  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: A better way than tweaking NTUP_PER_BUCKET  (Stephen Frost <sfrost@snowman.net>)
List pgsql-hackers
On 22.06.2013 19:19, Simon Riggs wrote:
> So I think that (2) is the best route: Given that we know with much
> better certainty the number of rows in the scanned-relation, we should
> be able to examine our hash table after it has been built and decide
> whether it would be cheaper to rebuild the hash table with the right
> number of buckets, or continue processing with what we have now. Which
> is roughly what Heikki proposed already, in January.

Back in January, I wrote a quick patch to experiment with rehashing when
the hash table becomes too full. It was too late to make it into 9.3 so
I didn't pursue it further back then, but IIRC it worked. If we have the
capability to rehash, the accuracy of the initial guess becomes much
less important.

- Heikki

Attachment

pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: [PATCH] add --progress option to pgbench (submission 3)
Next
From: Simon Riggs
Date:
Subject: Re: A better way than tweaking NTUP_PER_BUCKET