Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
65ccd103
Commit
65ccd103
authored
Feb 18, 1999
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable bushy plans by default.
parent
e78662d8
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
21 additions
and
52 deletions
+21
-52
doc/src/sgml/geqo.sgml
doc/src/sgml/geqo.sgml
+4
-6
src/backend/optimizer/geqo/geqo_eval.c
src/backend/optimizer/geqo/geqo_eval.c
+7
-6
src/backend/optimizer/path/allpaths.c
src/backend/optimizer/path/allpaths.c
+2
-8
src/backend/optimizer/path/joinrels.c
src/backend/optimizer/path/joinrels.c
+4
-4
src/backend/tcop/postgres.c
src/backend/tcop/postgres.c
+2
-18
src/include/optimizer/internal.h
src/include/optimizer/internal.h
+1
-3
src/man/postgres.1
src/man/postgres.1
+1
-7
No files found.
doc/src/sgml/geqo.sgml
View file @
65ccd103
<!--
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/geqo.sgml,v 1.
5 1998/12/29 02:24:15 thomas
Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/geqo.sgml,v 1.
6 1999/02/18 05:26:17 momjian
Exp $
Genetic Optimizer
Genetic Optimizer
$Log: geqo.sgml,v $
$Log: geqo.sgml,v $
Revision 1.6 1999/02/18 05:26:17 momjian
Enable bushy plans by default.
Revision 1.5 1998/12/29 02:24:15 thomas
Revision 1.5 1998/12/29 02:24:15 thomas
Clean up to ensure tag completion as required by the newest versions
Clean up to ensure tag completion as required by the newest versions
of Norm's Modular Style Sheets and jade/docbook.
of Norm's Modular Style Sheets and jade/docbook.
...
@@ -308,11 +311,6 @@ Suggestions are welcome :-(
...
@@ -308,11 +311,6 @@ Suggestions are welcome :-(
<Sect2>
<Sect2>
<Title>Further Improvements</Title>
<Title>Further Improvements</Title>
<Para>
Enable bushy query tree processing within <ProductName>Postgres</ProductName>;
that may improve the quality of query plans.
</para>
<BIBLIOGRAPHY Id="geqo-biblio">
<BIBLIOGRAPHY Id="geqo-biblio">
<TITLE>
<TITLE>
References
References
...
...
src/backend/optimizer/geqo/geqo_eval.c
View file @
65ccd103
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: geqo_eval.c,v 1.3
4 1999/02/18 04:55:54
momjian Exp $
* $Id: geqo_eval.c,v 1.3
5 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
...
@@ -119,12 +119,13 @@ gimme_tree(Query *root, Gene *tour, int rel_count, int num_gene, RelOptInfo *old
inner_rel
->
joininfo
,
inner_rel
->
joininfo
,
inner_rel
->
relids
)))
inner_rel
->
relids
)))
{
{
if
(
!
BushyPlanFlag
)
new_rels
=
make_rels_by_clauseless_joins
(
old_rel
,
new_rels
=
make_rels_by_clauseless_joins
(
old_rel
,
lcons
(
inner_rel
,
NIL
));
lcons
(
inner_rel
,
NIL
));
/* we don't do bushy plans in geqo, do we? bjm 02/18/1999
else
new_rels = append(new_rels,
new_rels
=
make_rels_by_clauseless_joins
(
old_rel
,
make_rels_by_clauseless_joins(old_rel,
lcons(old_rel,NIL));
lcons(old_rel,NIL));
*/
}
}
/* process new_rel->pathlist */
/* process new_rel->pathlist */
...
...
src/backend/optimizer/path/allpaths.c
View file @
65ccd103
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.4
1 1999/02/18 00:49:17
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.4
2 1999/02/18 05:26:19
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -147,7 +147,6 @@ set_base_rel_pathlist(Query *root, List *rels)
...
@@ -147,7 +147,6 @@ set_base_rel_pathlist(Query *root, List *rels)
* Find all possible joinpaths for a query by successively finding ways
* Find all possible joinpaths for a query by successively finding ways
* to join single relations into join relations.
* 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
* Find all possible joinpaths(bushy trees) for a query by systematically
* finding ways to join relations(both original and derived) together.
* 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)
...
@@ -221,12 +220,7 @@ make_one_rel_by_joins(Query *root, List *rels, int levels_needed)
}
}
Assert
(
BushyPlanFlag
||
length
(
rels
)
==
1
);
return
get_cheapest_complete_rel
(
rels
);
if
(
!
BushyPlanFlag
)
return
lfirst
(
rels
);
else
return
get_cheapest_complete_rel
(
rels
);
}
}
/*****************************************************************************
/*****************************************************************************
...
...
src/backend/optimizer/path/joinrels.c
View file @
65ccd103
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.2
8 1999/02/18 04:45:36
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.2
9 1999/02/18 05:26:19
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -69,9 +69,9 @@ make_rels_by_joins(Query *root, List *old_rels)
...
@@ -69,9 +69,9 @@ make_rels_by_joins(Query *root, List *old_rels)
*/
*/
joined_rels
=
make_rels_by_clauseless_joins
(
old_rel
,
joined_rels
=
make_rels_by_clauseless_joins
(
old_rel
,
root
->
base_rel_list
);
root
->
base_rel_list
);
if
(
BushyPlanFlag
)
joined_rels
=
append
(
joined_rels
,
joined_rels
=
make_rels_by_clauseless_joins
(
old_rel
,
make_rels_by_clauseless_joins
(
old_rel
,
old_rels
);
old_rels
)
);
}
}
join_list
=
nconc
(
join_list
,
joined_rels
);
join_list
=
nconc
(
join_list
,
joined_rels
);
...
...
src/backend/tcop/postgres.c
View file @
65ccd103
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.10
1 1999/02/16 00:41:01
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.10
2 1999/02/18 05:26:24
momjian Exp $
*
*
* NOTES
* NOTES
* this is the "main" module of the postgres backend and
* this is the "main" module of the postgres backend and
...
@@ -168,14 +168,6 @@ int UseNewLine = 0; /* Use EOF as query delimiters */
...
@@ -168,14 +168,6 @@ int UseNewLine = 0; /* Use EOF as query delimiters */
#endif
/* TCOP_DONTUSENEWLINE */
#endif
/* TCOP_DONTUSENEWLINE */
/* ----------------
* bushy tree plan flag: if true planner will generate bushy-tree
* plans
* ----------------
*/
int
BushyPlanFlag
=
0
;
/* default to false -- consider only
* left-deep trees */
/*
/*
** Flags for expensive function optimization -- JMH 3/9/92
** Flags for expensive function optimization -- JMH 3/9/92
*/
*/
...
@@ -1041,14 +1033,6 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
...
@@ -1041,14 +1033,6 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
#endif
#endif
break
;
break
;
case
'b'
:
/* ----------------
* set BushyPlanFlag to true.
* ----------------
*/
BushyPlanFlag
=
1
;
break
;
case
'B'
:
case
'B'
:
/* ----------------
/* ----------------
* specify the size of buffer pool
* specify the size of buffer pool
...
@@ -1538,7 +1522,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
...
@@ -1538,7 +1522,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
if
(
!
IsUnderPostmaster
)
if
(
!
IsUnderPostmaster
)
{
{
puts
(
"
\n
POSTGRES backend interactive interface "
);
puts
(
"
\n
POSTGRES backend interactive interface "
);
puts
(
"$Revision: 1.10
1 $ $Date: 1999/02/16 00:41:01
$
\n
"
);
puts
(
"$Revision: 1.10
2 $ $Date: 1999/02/18 05:26:24
$
\n
"
);
}
}
/* ----------------
/* ----------------
...
...
src/include/optimizer/internal.h
View file @
65ccd103
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: internal.h,v 1.1
6 1999/02/16 00:41:03
momjian Exp $
* $Id: internal.h,v 1.1
7 1999/02/18 05:26:29
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -80,8 +80,6 @@
...
@@ -80,8 +80,6 @@
#define FLOAT_EQUAL(X,Y) ((X) - (Y) < TOLERANCE)
#define FLOAT_EQUAL(X,Y) ((X) - (Y) < TOLERANCE)
#define FLOAT_IS_ZERO(X) (FLOAT_EQUAL(X,0.0))
#define FLOAT_IS_ZERO(X) (FLOAT_EQUAL(X,0.0))
extern
int
BushyPlanFlag
;
/* #define deactivate_joininfo(joininfo) joininfo->inactive=true*/
/* #define deactivate_joininfo(joininfo) joininfo->inactive=true*/
/*#define joininfo_inactive(joininfo) joininfo->inactive */
/*#define joininfo_inactive(joininfo) joininfo->inactive */
...
...
src/man/postgres.1
View file @
65ccd103
.\" This is -*-nroff-*-
.\" This is -*-nroff-*-
.\" XXX standard disclaimer belongs here....
.\" XXX standard disclaimer belongs here....
.\" $Header: /cvsroot/pgsql/src/man/Attic/postgres.1,v 1.1
2 1998/08/24 01:51:20
momjian Exp $
.\" $Header: /cvsroot/pgsql/src/man/Attic/postgres.1,v 1.1
3 1999/02/18 05:26:34
momjian Exp $
.TH POSTGRESQL UNIX 12/08/96 PostgreSQL PostgreSQL
.TH POSTGRESQL UNIX 12/08/96 PostgreSQL PostgreSQL
.SH NAME
.SH NAME
postgres - the Postgres backend server
postgres - the Postgres backend server
...
@@ -173,12 +173,6 @@ Turns off the locking system.
...
@@ -173,12 +173,6 @@ Turns off the locking system.
.BR "-N"
.BR "-N"
Disables use of newline as a query delimiter.
Disables use of newline as a query delimiter.
.TP
.TP
.BR "-b"
Enables generation of bushy query plan trees (as opposed to left-deep
query plans trees). These query plans are not intended for actual
execution; in addition, this flag often causes Postgres to run out of
memory.
.TP
.BR "-f"
.BR "-f"
Forbids the use of particular scan and join methods:
Forbids the use of particular scan and join methods:
.IR s " and " i
.IR s " and " i
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment