]> granicus.if.org Git - postgresql/commit
Buy back some of the cycles spent in more-expensive hash functions by
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 1 Jun 2007 17:38:44 +0000 (17:38 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 1 Jun 2007 17:38:44 +0000 (17:38 +0000)
commitbd2c980b229eb5cf411b1d55bf9b26cca34875d7
tree0677ee408573e19f5c1a2acc6766695aea08143a
parent1f559b7d3aa411e08d2ad46a4bd7d9213945b103
Buy back some of the cycles spent in more-expensive hash functions by
selecting power-of-2, rather than prime, numbers of buckets in hash joins.
If the hash functions are doing their jobs properly by making all hash bits
equally random, this is good enough, and it saves expensive integer division
and modulus operations.
src/backend/executor/nodeHash.c
src/include/executor/hashjoin.h