diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-06-09 04:19:00 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-06-09 04:19:00 +0000 |
commit | a31ad27fc5dc32a1453233575b3cf7b5c34cf515 (patch) | |
tree | 6bff6baa96ebe794165a4939d234f3a54068e2c6 /src/backend/nodes/equalfuncs.c | |
parent | c51815afed2bfac02fbc4afff891eb1224eb7eae (diff) |
Simplify the planner's join clause management by storing join clauses
of a relation in a flat 'joininfo' list. The former arrangement grouped
the join clauses according to the set of unjoined relids used in each;
however, profiling on test cases involving lots of joins proves that
that data structure is a net loss. It takes more time to group the
join clauses together than is saved by avoiding duplicate tests later.
It doesn't help any that there are usually not more than one or two
clauses per group ...
Diffstat (limited to 'src/backend/nodes/equalfuncs.c')
-rw-r--r-- | src/backend/nodes/equalfuncs.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/backend/nodes/equalfuncs.c b/src/backend/nodes/equalfuncs.c index a1d951112c8..e625ca7f32c 100644 --- a/src/backend/nodes/equalfuncs.c +++ b/src/backend/nodes/equalfuncs.c @@ -18,7 +18,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.242 2005/06/05 22:32:54 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.243 2005/06/09 04:18:58 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -594,6 +594,7 @@ _equalRestrictInfo(RestrictInfo *a, RestrictInfo *b) COMPARE_NODE_FIELD(clause); COMPARE_SCALAR_FIELD(is_pushed_down); COMPARE_SCALAR_FIELD(valid_everywhere); + COMPARE_BITMAPSET_FIELD(required_relids); /* * We ignore all the remaining fields, since they may not be set yet, @@ -604,15 +605,6 @@ _equalRestrictInfo(RestrictInfo *a, RestrictInfo *b) } static bool -_equalJoinInfo(JoinInfo *a, JoinInfo *b) -{ - COMPARE_BITMAPSET_FIELD(unjoined_relids); - COMPARE_NODE_FIELD(jinfo_restrictinfo); - - return true; -} - -static bool _equalInClauseInfo(InClauseInfo *a, InClauseInfo *b) { COMPARE_BITMAPSET_FIELD(lefthand); @@ -1915,9 +1907,6 @@ equal(void *a, void *b) case T_RestrictInfo: retval = _equalRestrictInfo(a, b); break; - case T_JoinInfo: - retval = _equalJoinInfo(a, b); - break; case T_InClauseInfo: retval = _equalInClauseInfo(a, b); break; |