1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-03 20:02:46 +03:00

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 ...
This commit is contained in:
Tom Lane
2005-06-09 04:19:00 +00:00
parent c51815afed
commit a31ad27fc5
19 changed files with 285 additions and 465 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/optimizer/path/allpaths.c,v 1.132 2005/06/06 04:13:35 tgl Exp $
* $PostgreSQL: pgsql/src/backend/optimizer/path/allpaths.c,v 1.133 2005/06/09 04:18:59 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -1048,14 +1048,10 @@ debug_print_rel(PlannerInfo *root, RelOptInfo *rel)
printf("\n");
}
foreach(l, rel->joininfo)
if (rel->joininfo)
{
JoinInfo *j = (JoinInfo *) lfirst(l);
printf("\tjoininfo (");
print_relids(j->unjoined_relids);
printf("): ");
print_restrictclauses(root, j->jinfo_restrictinfo);
printf("\tjoininfo: ");
print_restrictclauses(root, rel->joininfo);
printf("\n");
}