aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeHash.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2002-03-06 20:49:46 +0000
committerBruce Momjian <bruce@momjian.us>2002-03-06 20:49:46 +0000
commit7ab746731812fb4574f04a7402eaa40d15e29720 (patch)
tree11883b3a5a44cf0401c3647599a3d1502c711623 /src/backend/executor/nodeHash.c
parent5b5cef9abd92e6e17f78cbf2838ac898f3427255 (diff)
downloadpostgresql-7ab746731812fb4574f04a7402eaa40d15e29720.tar.gz
postgresql-7ab746731812fb4574f04a7402eaa40d15e29720.zip
I've attached a patch which implements Bob Jenkin's hash function for
PostgreSQL. This hash function replaces the one used by hash indexes and the catalog cache. Hash joins use a different, relatively poor-quality hash function, but I'll fix that later. As suggested by Tom Lane, this patch also changes the size of the fixed hash table used by the catalog cache to be a power-of-2 (instead of a prime: I chose 256 instead of 257). This allows the catcache to lookup hash buckets using a simple bitmask. This should improve the performance of the catalog cache slightly, since the previous method (modulo a prime) was slow. In my tests, this improves the performance of hash indexes by between 4% and 8%; the performance when using btree indexes or seqscans is basically unchanged. Neil Conway <neilconway@rogers.com>
Diffstat (limited to 'src/backend/executor/nodeHash.c')
-rw-r--r--src/backend/executor/nodeHash.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/backend/executor/nodeHash.c b/src/backend/executor/nodeHash.c
index bf9bf6eeb0f..5645eb31609 100644
--- a/src/backend/executor/nodeHash.c
+++ b/src/backend/executor/nodeHash.c
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
*
- * $Id: nodeHash.c,v 1.60 2001/10/25 05:49:28 momjian Exp $
+ * $Id: nodeHash.c,v 1.61 2002/03/06 20:49:44 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -115,8 +115,7 @@ ExecInitHash(Hash *node, EState *estate, Plan *parent)
HashState *hashstate;
Plan *outerPlan;
- SO1_printf("ExecInitHash: %s\n",
- "initializing hash node");
+ SO_printf("ExecInitHash: initializing hash node\n");
/*
* assign the node's execution state