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
e78662d8
Commit
e78662d8
authored
Feb 18, 1999
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
optimizer cleanup
parent
d977ff7b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
12 deletions
+14
-12
src/backend/optimizer/geqo/geqo_eval.c
src/backend/optimizer/geqo/geqo_eval.c
+8
-8
src/backend/optimizer/geqo/geqo_main.c
src/backend/optimizer/geqo/geqo_main.c
+3
-2
src/include/optimizer/geqo.h
src/include/optimizer/geqo.h
+3
-2
No files found.
src/backend/optimizer/geqo/geqo_eval.c
View file @
e78662d8
...
...
@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: geqo_eval.c,v 1.3
3 1999/02/16 00:40:59
momjian Exp $
* $Id: geqo_eval.c,v 1.3
4 1999/02/18 04:55:54
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -86,12 +86,12 @@ geqo_eval(Query *root, Gene *tour, int num_gene)
* gimme_tree
* this program presumes that only LEFT-SIDED TREES are considered!
*
* 'o
uter
_rel' is the preceeding join
* 'o
ld
_rel' is the preceeding join
*
* Returns a new join relation incorporating all joins in a left-sided tree.
*/
RelOptInfo
*
gimme_tree
(
Query
*
root
,
Gene
*
tour
,
int
rel_count
,
int
num_gene
,
RelOptInfo
*
o
uter
_rel
)
gimme_tree
(
Query
*
root
,
Gene
*
tour
,
int
rel_count
,
int
num_gene
,
RelOptInfo
*
o
ld
_rel
)
{
RelOptInfo
*
inner_rel
;
/* current relation */
int
base_rel_index
;
...
...
@@ -115,16 +115,16 @@ gimme_tree(Query *root, Gene *tour, int rel_count, int num_gene, RelOptInfo *out
}
else
{
/* tree main part */
if
(
!
(
new_rels
=
make_rels_by_clause_joins
(
root
,
o
uter
_rel
,
if
(
!
(
new_rels
=
make_rels_by_clause_joins
(
root
,
o
ld
_rel
,
inner_rel
->
joininfo
,
inner_rel
->
relids
)))
{
if
(
!
BushyPlanFlag
)
new_rels
=
make_rels_by_clauseless_joins
(
o
uter
_rel
,
new_rels
=
make_rels_by_clauseless_joins
(
o
ld
_rel
,
lcons
(
inner_rel
,
NIL
));
else
new_rels
=
make_rels_by_clauseless_joins
(
o
uter
_rel
,
lcons
(
o
uter
_rel
,
NIL
));
new_rels
=
make_rels_by_clauseless_joins
(
o
ld
_rel
,
lcons
(
o
ld
_rel
,
NIL
));
}
/* process new_rel->pathlist */
...
...
@@ -168,7 +168,7 @@ gimme_tree(Query *root, Gene *tour, int rel_count, int num_gene, RelOptInfo *out
}
return
o
uter
_rel
;
/* tree finished ... */
return
o
ld
_rel
;
/* tree finished ... */
}
static
RelOptInfo
*
...
...
src/backend/optimizer/geqo/geqo_main.c
View file @
e78662d8
...
...
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: geqo_main.c,v 1.1
3 1999/02/13 23:16:08
momjian Exp $
* $Id: geqo_main.c,v 1.1
4 1999/02/18 04:55:54
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -253,7 +253,8 @@ geqo(Query *root)
best_tour
=
(
Gene
*
)
pool
->
data
[
0
].
string
;
/* root->join_relation_list_ will be modified during this ! */
best_rel
=
(
RelOptInfo
*
)
gimme_tree
(
root
,
best_tour
,
0
,
pool
->
string_length
,
NULL
);
best_rel
=
(
RelOptInfo
*
)
gimme_tree
(
root
,
best_tour
,
0
,
pool
->
string_length
,
NULL
);
/* DBG: show the query plan
print_plan(best_plan, root);
...
...
src/include/optimizer/geqo.h
View file @
e78662d8
...
...
@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: geqo.h,v 1.1
2 1999/02/15 05:50:02
momjian Exp $
* $Id: geqo.h,v 1.1
3 1999/02/18 04:55:54
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -75,7 +75,8 @@ extern RelOptInfo *geqo(Query *root);
extern
void
geqo_params
(
int
string_length
);
extern
Cost
geqo_eval
(
Query
*
root
,
Gene
*
tour
,
int
num_gene
);
extern
RelOptInfo
*
gimme_tree
(
Query
*
root
,
Gene
*
tour
,
int
rel_count
,
int
num_gene
,
RelOptInfo
*
outer_rel
);
extern
RelOptInfo
*
gimme_tree
(
Query
*
root
,
Gene
*
tour
,
int
rel_count
,
int
num_gene
,
RelOptInfo
*
old_rel
);
#endif
/* GEQO_H */
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