aboutsummaryrefslogtreecommitdiff
path: root/src/backend/optimizer/prep/prepunion.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-06-09 04:19:00 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-06-09 04:19:00 +0000
commita31ad27fc5dc32a1453233575b3cf7b5c34cf515 (patch)
tree6bff6baa96ebe794165a4939d234f3a54068e2c6 /src/backend/optimizer/prep/prepunion.c
parentc51815afed2bfac02fbc4afff891eb1224eb7eae (diff)
downloadpostgresql-a31ad27fc5dc32a1453233575b3cf7b5c34cf515.tar.gz
postgresql-a31ad27fc5dc32a1453233575b3cf7b5c34cf515.zip
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/optimizer/prep/prepunion.c')
-rw-r--r--src/backend/optimizer/prep/prepunion.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/backend/optimizer/prep/prepunion.c b/src/backend/optimizer/prep/prepunion.c
index e7aee1d52ab..2139ac23f1c 100644
--- a/src/backend/optimizer/prep/prepunion.c
+++ b/src/backend/optimizer/prep/prepunion.c
@@ -14,7 +14,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/optimizer/prep/prepunion.c,v 1.122 2005/06/05 22:32:56 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/optimizer/prep/prepunion.c,v 1.123 2005/06/09 04:18:59 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1023,6 +1023,9 @@ adjust_inherited_attrs_mutator(Node *node,
newinfo->clause_relids = adjust_relid_set(oldinfo->clause_relids,
context->old_rt_index,
context->new_rt_index);
+ newinfo->required_relids = adjust_relid_set(oldinfo->required_relids,
+ context->old_rt_index,
+ context->new_rt_index);
newinfo->left_relids = adjust_relid_set(oldinfo->left_relids,
context->old_rt_index,
context->new_rt_index);