diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2002-11-30 00:08:22 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2002-11-30 00:08:22 +0000 |
commit | ddb2d78de0172b1f3a00c8e3bf35345af9952f43 (patch) | |
tree | 75aaa2922e21b78514cd592241c1718a2e6a4ba8 /src/include/executor | |
parent | f68f11928d5c791873073c882775dae10283ff49 (diff) | |
download | postgresql-ddb2d78de0172b1f3a00c8e3bf35345af9952f43.tar.gz postgresql-ddb2d78de0172b1f3a00c8e3bf35345af9952f43.zip |
Upgrade planner and executor to allow multiple hash keys for a hash join,
instead of only one. This should speed up planning (only one hash path
to consider for a given pair of relations) as well as allow more effective
hashing, when there are multiple hashable joinclauses.
Diffstat (limited to 'src/include/executor')
-rw-r--r-- | src/include/executor/hashjoin.h | 13 | ||||
-rw-r--r-- | src/include/executor/nodeHash.h | 6 |
2 files changed, 10 insertions, 9 deletions
diff --git a/src/include/executor/hashjoin.h b/src/include/executor/hashjoin.h index 1869feae08b..a2d5f633fcd 100644 --- a/src/include/executor/hashjoin.h +++ b/src/include/executor/hashjoin.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: hashjoin.h,v 1.26 2002/06/20 20:29:49 momjian Exp $ + * $Id: hashjoin.h,v 1.27 2002/11/30 00:08:20 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -69,12 +69,13 @@ typedef struct HashTableData * file */ /* - * Info about the datatype being hashed. We assume that the inner and - * outer sides of the hash are the same type, or at least - * binary-compatible types. + * Info about the datatypes being hashed. We assume that the inner and + * outer sides of each hashclause are the same type, or at least + * binary-compatible types. Each of these fields points to an array + * of the same length as the number of hash keys. */ - int16 typLen; - bool typByVal; + int16 *typLens; + bool *typByVals; /* * During 1st scan of inner relation, we get tuples from executor. If diff --git a/src/include/executor/nodeHash.h b/src/include/executor/nodeHash.h index 8bea51e8af0..654906cd3c2 100644 --- a/src/include/executor/nodeHash.h +++ b/src/include/executor/nodeHash.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: nodeHash.h,v 1.25 2002/11/06 22:31:24 tgl Exp $ + * $Id: nodeHash.h,v 1.26 2002/11/30 00:08:20 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -24,10 +24,10 @@ extern HashJoinTable ExecHashTableCreate(Hash *node); extern void ExecHashTableDestroy(HashJoinTable hashtable); extern void ExecHashTableInsert(HashJoinTable hashtable, ExprContext *econtext, - Node *hashkey); + List *hashkeys); extern int ExecHashGetBucket(HashJoinTable hashtable, ExprContext *econtext, - Node *hashkey); + List *hashkeys); extern HeapTuple ExecScanHashBucket(HashJoinState *hjstate, List *hjclauses, ExprContext *econtext); extern void ExecHashTableReset(HashJoinTable hashtable, long ntuples); |