Fix performance problems in multi-batch hash joins by ensuring that we select
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 1 Jun 2007 15:58:09 +0000 (15:58 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 1 Jun 2007 15:58:09 +0000 (15:58 +0000)
commit3599bb027f0de1cc79a003f4c03635a927fe5d36
treeb2e641c34ef4827cacfa3bc6ca8dd910de169846
parent75762d20767de279d1dda09aa019fa29ac1dbe8e
Fix performance problems in multi-batch hash joins by ensuring that we select
a well-randomized batch number even when given a poorly-randomized hash value.
This is a bit inefficient but seems the only practical solution given the
constraint that we can't change the hash functions in released branches.
Per report from Joseph Shraibman.

Applied to 8.1 and 8.2 only --- HEAD is getting a cleaner fix, and 8.0 and
before use different coding that seems less vulnerable.
src/backend/access/hash/hashfunc.c
src/backend/executor/nodeHash.c
src/include/access/hash.h