mirror of
https://github.com/postgres/postgres.git
synced 2025-08-27 07:42:10 +03:00
Enable bushy plans by default.
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: geqo_eval.c,v 1.34 1999/02/18 04:55:54 momjian Exp $
|
||||
* $Id: geqo_eval.c,v 1.35 1999/02/18 05:26:18 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -119,12 +119,13 @@ gimme_tree(Query *root, Gene *tour, int rel_count, int num_gene, RelOptInfo *old
|
||||
inner_rel->joininfo,
|
||||
inner_rel->relids)))
|
||||
{
|
||||
if (!BushyPlanFlag)
|
||||
new_rels = make_rels_by_clauseless_joins(old_rel,
|
||||
lcons(inner_rel,NIL));
|
||||
else
|
||||
new_rels = make_rels_by_clauseless_joins(old_rel,
|
||||
new_rels = make_rels_by_clauseless_joins(old_rel,
|
||||
lcons(inner_rel,NIL));
|
||||
/* we don't do bushy plans in geqo, do we? bjm 02/18/1999
|
||||
new_rels = append(new_rels,
|
||||
make_rels_by_clauseless_joins(old_rel,
|
||||
lcons(old_rel,NIL));
|
||||
*/
|
||||
}
|
||||
|
||||
/* process new_rel->pathlist */
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.41 1999/02/18 00:49:17 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.42 1999/02/18 05:26:19 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -147,7 +147,6 @@ set_base_rel_pathlist(Query *root, List *rels)
|
||||
* Find all possible joinpaths for a query by successively finding ways
|
||||
* to join single relations into join relations.
|
||||
*
|
||||
* if BushyPlanFlag is set, bushy tree plans will be generated:
|
||||
* Find all possible joinpaths(bushy trees) for a query by systematically
|
||||
* finding ways to join relations(both original and derived) together.
|
||||
*
|
||||
@@ -221,12 +220,7 @@ make_one_rel_by_joins(Query *root, List *rels, int levels_needed)
|
||||
|
||||
}
|
||||
|
||||
Assert(BushyPlanFlag || length(rels) == 1);
|
||||
|
||||
if (!BushyPlanFlag)
|
||||
return lfirst(rels);
|
||||
else
|
||||
return get_cheapest_complete_rel(rels);
|
||||
return get_cheapest_complete_rel(rels);
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.28 1999/02/18 04:45:36 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.29 1999/02/18 05:26:19 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -69,9 +69,9 @@ make_rels_by_joins(Query *root, List *old_rels)
|
||||
*/
|
||||
joined_rels = make_rels_by_clauseless_joins(old_rel,
|
||||
root->base_rel_list);
|
||||
if (BushyPlanFlag)
|
||||
joined_rels = make_rels_by_clauseless_joins(old_rel,
|
||||
old_rels);
|
||||
joined_rels = append(joined_rels,
|
||||
make_rels_by_clauseless_joins(old_rel,
|
||||
old_rels));
|
||||
}
|
||||
|
||||
join_list = nconc(join_list, joined_rels);
|
||||
|
Reference in New Issue
Block a user