why postgresql define NTUP_PER_BUCKET as 10, not other numbers smaller

From: b8flowerfire <b8flowerfire(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: why postgresql define NTUP_PER_BUCKET as 10, not other numbers smaller
Date: 2014-06-09 08:06:24
Message-ID: 1402301184854-5806472.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

When I read the source code about the hashjoin, I was very confused that the
postgresql define the NTUP_PER_BUCKET value as 10.
Since this value is used to estimate the tuple count in one bucket, is it
better if we have a smaller value?
I have not done some experiments, but it seems that we could archive less
hash collisions and better performance if we decrease the value.
So could anyone explain to me that why we define NTUP_PER_BUCKET as 10?
If there exists a specified situation that we would get worse performance or
some troubles if set NTUP_PER_BUCKET to 1 or 2?

Thanks very much.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/why-postgresql-define-NTUP-PER-BUCKET-as-10-not-other-numbers-smaller-tp5806472.html
Sent from the PostgreSQL - hackers mailing list archive at Nabble.com.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2014-06-09 09:17:41 Re: pg_basebackup failed to back up large file
Previous Message Gavin Flower 2014-06-09 07:06:30 Re: "RETURNING PRIMARY KEY" syntax extension