diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-11-28 23:46:03 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-11-28 23:46:03 +0000 |
commit | 4ab76b1c20500922aebfdd0c26aef4bdcc608e88 (patch) | |
tree | 15520d91328e0773d59e68f756d6f60302b931b9 /src/include/nodes/execnodes.h | |
parent | ee4aa3021e47584120a019b47859c11d196fba04 (diff) | |
download | postgresql-4ab76b1c20500922aebfdd0c26aef4bdcc608e88.tar.gz |
Tweak hash join code to use an additional heuristic for deciding whether
it's worth probing the outer relation for emptiness before building the
hash table. To wit, if we're rescanning a join previously performed,
remember whether we found it nonempty the previous time, and don't bother
with the probe if it was nonempty. This buys back the performance lost
in examples like Mario Weilguni's.
Diffstat (limited to 'src/include/nodes/execnodes.h')
-rw-r--r-- | src/include/nodes/execnodes.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h index e9fb41f653..7371f95007 100644 --- a/src/include/nodes/execnodes.h +++ b/src/include/nodes/execnodes.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/nodes/execnodes.h,v 1.144 2005/11/26 22:14:57 tgl Exp $ + * $PostgreSQL: pgsql/src/include/nodes/execnodes.h,v 1.145 2005/11/28 23:46:03 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1118,6 +1118,7 @@ typedef struct MergeJoinState * hj_FirstOuterTupleSlot first tuple retrieved from outer plan * hj_NeedNewOuter true if need new outer tuple on next call * hj_MatchedOuter true if found a join match for current outer + * hj_OuterNotEmpty true if outer relation known not empty * ---------------- */ @@ -1142,6 +1143,7 @@ typedef struct HashJoinState TupleTableSlot *hj_FirstOuterTupleSlot; bool hj_NeedNewOuter; bool hj_MatchedOuter; + bool hj_OuterNotEmpty; } HashJoinState; |