Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 65ccd10

Browse files
committed
Enable bushy plans by default.
1 parent e78662d commit 65ccd10

File tree

7 files changed

+21
-52
lines changed

7 files changed

+21
-52
lines changed

doc/src/sgml/geqo.sgml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/geqo.sgml,v 1.5 1998/12/29 02:24:15 thomas Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/geqo.sgml,v 1.6 1999/02/18 05:26:17 momjian Exp $
33
Genetic Optimizer
44

55
$Log: geqo.sgml,v $
6+
Revision 1.6 1999/02/18 05:26:17 momjian
7+
Enable bushy plans by default.
8+
69
Revision 1.5 1998/12/29 02:24:15 thomas
710
Clean up to ensure tag completion as required by the newest versions
811
of Norm's Modular Style Sheets and jade/docbook.
@@ -308,11 +311,6 @@ Suggestions are welcome :-(
308311
<Sect2>
309312
<Title>Further Improvements</Title>
310313

311-
<Para>
312-
Enable bushy query tree processing within <ProductName>Postgres</ProductName>;
313-
that may improve the quality of query plans.
314-
</para>
315-
316314
<BIBLIOGRAPHY Id="geqo-biblio">
317315
<TITLE>
318316
References

src/backend/optimizer/geqo/geqo_eval.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Copyright (c) 1994, Regents of the University of California
77
*
8-
* $Id: geqo_eval.c,v 1.34 1999/02/18 04:55:54 momjian Exp $
8+
* $Id: geqo_eval.c,v 1.35 1999/02/18 05:26:18 momjian Exp $
99
*
1010
*-------------------------------------------------------------------------
1111
*/
@@ -119,12 +119,13 @@ gimme_tree(Query *root, Gene *tour, int rel_count, int num_gene, RelOptInfo *old
119119
inner_rel->joininfo,
120120
inner_rel->relids)))
121121
{
122-
if (!BushyPlanFlag)
123-
new_rels = make_rels_by_clauseless_joins(old_rel,
124-
lcons(inner_rel,NIL));
125-
else
126-
new_rels = make_rels_by_clauseless_joins(old_rel,
122+
new_rels = make_rels_by_clauseless_joins(old_rel,
123+
lcons(inner_rel,NIL));
124+
/* we don't do bushy plans in geqo, do we? bjm 02/18/1999
125+
new_rels = append(new_rels,
126+
make_rels_by_clauseless_joins(old_rel,
127127
lcons(old_rel,NIL));
128+
*/
128129
}
129130

130131
/* process new_rel->pathlist */

src/backend/optimizer/path/allpaths.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.41 1999/02/18 00:49:17 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.42 1999/02/18 05:26:19 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -147,7 +147,6 @@ set_base_rel_pathlist(Query *root, List *rels)
147147
* Find all possible joinpaths for a query by successively finding ways
148148
* to join single relations into join relations.
149149
*
150-
* if BushyPlanFlag is set, bushy tree plans will be generated:
151150
* Find all possible joinpaths(bushy trees) for a query by systematically
152151
* finding ways to join relations(both original and derived) together.
153152
*
@@ -221,12 +220,7 @@ make_one_rel_by_joins(Query *root, List *rels, int levels_needed)
221220

222221
}
223222

224-
Assert(BushyPlanFlag || length(rels) == 1);
225-
226-
if (!BushyPlanFlag)
227-
return lfirst(rels);
228-
else
229-
return get_cheapest_complete_rel(rels);
223+
return get_cheapest_complete_rel(rels);
230224
}
231225

232226
/*****************************************************************************

src/backend/optimizer/path/joinrels.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.28 1999/02/18 04:45:36 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.29 1999/02/18 05:26:19 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -69,9 +69,9 @@ make_rels_by_joins(Query *root, List *old_rels)
6969
*/
7070
joined_rels = make_rels_by_clauseless_joins(old_rel,
7171
root->base_rel_list);
72-
if (BushyPlanFlag)
73-
joined_rels = make_rels_by_clauseless_joins(old_rel,
74-
old_rels);
72+
joined_rels = append(joined_rels,
73+
make_rels_by_clauseless_joins(old_rel,
74+
old_rels));
7575
}
7676

7777
join_list = nconc(join_list, joined_rels);

src/backend/tcop/postgres.c

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.101 1999/02/16 00:41:01 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.102 1999/02/18 05:26:24 momjian Exp $
1111
*
1212
* NOTES
1313
* this is the "main" module of the postgres backend and
@@ -168,14 +168,6 @@ int UseNewLine = 0; /* Use EOF as query delimiters */
168168

169169
#endif /* TCOP_DONTUSENEWLINE */
170170

171-
/* ----------------
172-
* bushy tree plan flag: if true planner will generate bushy-tree
173-
* plans
174-
* ----------------
175-
*/
176-
int BushyPlanFlag = 0; /* default to false -- consider only
177-
* left-deep trees */
178-
179171
/*
180172
** Flags for expensive function optimization -- JMH 3/9/92
181173
*/
@@ -1041,14 +1033,6 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
10411033
#endif
10421034
break;
10431035

1044-
case 'b':
1045-
/* ----------------
1046-
* set BushyPlanFlag to true.
1047-
* ----------------
1048-
*/
1049-
BushyPlanFlag = 1;
1050-
break;
1051-
10521036
case 'B':
10531037
/* ----------------
10541038
* specify the size of buffer pool
@@ -1538,7 +1522,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
15381522
if (!IsUnderPostmaster)
15391523
{
15401524
puts("\nPOSTGRES backend interactive interface ");
1541-
puts("$Revision: 1.101 $ $Date: 1999/02/16 00:41:01 $\n");
1525+
puts("$Revision: 1.102 $ $Date: 1999/02/18 05:26:24 $\n");
15421526
}
15431527

15441528
/* ----------------

src/include/optimizer/internal.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: internal.h,v 1.16 1999/02/16 00:41:03 momjian Exp $
9+
* $Id: internal.h,v 1.17 1999/02/18 05:26:29 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -80,8 +80,6 @@
8080
#define FLOAT_EQUAL(X,Y) ((X) - (Y) < TOLERANCE)
8181
#define FLOAT_IS_ZERO(X) (FLOAT_EQUAL(X,0.0))
8282

83-
extern int BushyPlanFlag;
84-
8583
/* #define deactivate_joininfo(joininfo) joininfo->inactive=true*/
8684
/*#define joininfo_inactive(joininfo) joininfo->inactive */
8785

src/man/postgres.1

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.\" This is -*-nroff-*-
22
.\" XXX standard disclaimer belongs here....
3-
.\" $Header: /cvsroot/pgsql/src/man/Attic/postgres.1,v 1.12 1998/08/24 01:51:20 momjian Exp $
3+
.\" $Header: /cvsroot/pgsql/src/man/Attic/postgres.1,v 1.13 1999/02/18 05:26:34 momjian Exp $
44
.TH POSTGRESQL UNIX 12/08/96 PostgreSQL PostgreSQL
55
.SH NAME
66
postgres - the Postgres backend server
@@ -173,12 +173,6 @@ Turns off the locking system.
173173
.BR "-N"
174174
Disables use of newline as a query delimiter.
175175
.TP
176-
.BR "-b"
177-
Enables generation of bushy query plan trees (as opposed to left-deep
178-
query plans trees). These query plans are not intended for actual
179-
execution; in addition, this flag often causes Postgres to run out of
180-
memory.
181-
.TP
182176
.BR "-f"
183177
Forbids the use of particular scan and join methods:
184178
.IR s " and " i

0 commit comments

Comments
 (0)