From a31ad27fc5dc32a1453233575b3cf7b5c34cf515 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 9 Jun 2005 04:19:00 +0000 Subject: 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 ... --- src/backend/optimizer/prep/prepunion.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/backend/optimizer/prep/prepunion.c') 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); -- cgit v1.2.3