aboutsummaryrefslogtreecommitdiff
path: root/src/include/executor/nodeHash.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2000-04-18 05:43:02 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2000-04-18 05:43:02 +0000
commit25442d8d2fd35389813062f523488821f4fc31d4 (patch)
treed58f9ec0b5a7d3074c222008a9d58d5c35db5251 /src/include/executor/nodeHash.h
parent24864d048eec2c579346eb31a42c87be1c92644e (diff)
downloadpostgresql-25442d8d2fd35389813062f523488821f4fc31d4.tar.gz
postgresql-25442d8d2fd35389813062f523488821f4fc31d4.zip
Correct oversight in hashjoin cost estimation: nodeHash sizes its hash
table for an average of NTUP_PER_BUCKET tuples/bucket, but cost_hashjoin was assuming a target load of one tuple/bucket. This was causing a noticeable underestimate of hashjoin costs.
Diffstat (limited to 'src/include/executor/nodeHash.h')
-rw-r--r--src/include/executor/nodeHash.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/include/executor/nodeHash.h b/src/include/executor/nodeHash.h
index 0460368d8b1..b61ced7cdc1 100644
--- a/src/include/executor/nodeHash.h
+++ b/src/include/executor/nodeHash.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodeHash.h,v 1.15 2000/01/26 05:58:05 momjian Exp $
+ * $Id: nodeHash.h,v 1.16 2000/04/18 05:43:00 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -16,6 +16,9 @@
#include "nodes/plannodes.h"
+/* NTUP_PER_BUCKET is exported because planner wants to see it */
+#define NTUP_PER_BUCKET 10
+
extern TupleTableSlot *ExecHash(Hash *node);
extern bool ExecInitHash(Hash *node, EState *estate, Plan *parent);
extern int ExecCountSlotsHash(Hash *node);