1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-15 19:21:59 +03:00

Fix bushy plans. Cleanup.

This commit is contained in:
Bruce Momjian
1999-02-18 00:49:48 +00:00
parent c82ca4c158
commit 31cce21fb0
22 changed files with 182 additions and 365 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.40 1999/02/16 00:40:59 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.41 1999/02/18 00:49:17 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -191,6 +191,8 @@ make_one_rel_by_joins(Query *root, List *rels, int levels_needed)
merge_rels_with_same_relids(joined_rels);
root->join_rel_list = rels = joined_rels;
#if 0
/*
* * for each expensive predicate in each path in each distinct
@ -203,17 +205,6 @@ make_one_rel_by_joins(Query *root, List *rels, int levels_needed)
rels_set_cheapest(joined_rels);
if (BushyPlanFlag)
{
/*
* In case of bushy trees if there is still a join between a
* join relation and another relation, add a new joininfo that
* involves the join relation to the joininfo list of the
* other relation
*/
add_rel_to_rel_joininfos(root, joined_rels, rels);
}
foreach(x, joined_rels)
{
rel = (RelOptInfo *) lfirst(x);
@ -228,20 +219,6 @@ make_one_rel_by_joins(Query *root, List *rels, int levels_needed)
#endif
}
if (BushyPlanFlag)
{
/*
* prune rels that have been completely incorporated into new
* join rels
*/
joined_rels = del_rels_all_bushy_inactive(rels);
/*
* merge join rels if then contain the same list of base rels
*/
merge_rels_with_same_relids(joined_rels);
}
root->join_rel_list = rels = joined_rels;
}
Assert(BushyPlanFlag || length(rels) == 1);