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
c82ca4c1
Commit
c82ca4c1
authored
Feb 16, 1999
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Re-enable bushy plans. Vadim want them.
parent
cd550c76
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
71 deletions
+23
-71
src/backend/optimizer/geqo/geqo_eval.c
src/backend/optimizer/geqo/geqo_eval.c
+5
-7
src/backend/optimizer/path/allpaths.c
src/backend/optimizer/path/allpaths.c
+6
-15
src/backend/optimizer/path/joinrels.c
src/backend/optimizer/path/joinrels.c
+5
-12
src/backend/optimizer/path/prune.c
src/backend/optimizer/path/prune.c
+1
-27
src/backend/tcop/postgres.c
src/backend/tcop/postgres.c
+2
-6
src/include/optimizer/internal.h
src/include/optimizer/internal.h
+1
-3
src/include/optimizer/paths.h
src/include/optimizer/paths.h
+3
-1
No files found.
src/backend/optimizer/geqo/geqo_eval.c
View file @
c82ca4c1
...
...
@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: geqo_eval.c,v 1.3
2 1999/02/15 03:22:00
momjian Exp $
* $Id: geqo_eval.c,v 1.3
3 1999/02/16 00:40:59
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -119,14 +119,12 @@ gimme_tree(Query *root, Gene *tour, int rel_count, int num_gene, RelOptInfo *out
inner_rel
->
joininfo
,
inner_rel
->
relids
)))
{
#ifdef NOT_USED
if
(
BushyPlanFlag
)
if
(
!
BushyPlanFlag
)
new_rels
=
make_rels_by_clauseless_joins
(
outer_rel
,
lcons
(
outer_rel
,
NIL
));
else
#endif
new_rels
=
make_rels_by_clauseless_joins
(
outer_rel
,
lcons
(
inner_rel
,
NIL
));
else
new_rels
=
make_rels_by_clauseless_joins
(
outer_rel
,
lcons
(
outer_rel
,
NIL
));
}
/* process new_rel->pathlist */
...
...
src/backend/optimizer/path/allpaths.c
View file @
c82ca4c1
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.
39 1999/02/15 05:49
:59 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.
40 1999/02/16 00:40
:59 momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -203,7 +203,6 @@ make_one_rel_by_joins(Query *root, List *rels, int levels_needed)
rels_set_cheapest
(
joined_rels
);
#ifdef NOT_USED
if
(
BushyPlanFlag
)
{
/*
...
...
@@ -214,7 +213,6 @@ make_one_rel_by_joins(Query *root, List *rels, int levels_needed)
*/
add_rel_to_rel_joininfos
(
root
,
joined_rels
,
rels
);
}
#endif
foreach
(
x
,
joined_rels
)
{
...
...
@@ -230,35 +228,28 @@ make_one_rel_by_joins(Query *root, List *rels, int levels_needed)
#endif
}
#ifdef NOT_USED
if
(
BushyPlanFlag
)
{
/*
* prune rels that have been completely incorporated into new
* join rels
*/
rels
=
del_rels_all_bushy_inactive
(
rels
);
joined_
rels
=
del_rels_all_bushy_inactive
(
rels
);
/*
* merge join rels if then contain the same list of base rels
*/
joined_rels
=
merge_rels_with_same_relids
(
joined_rels
,
rels
);
merge_rels_with_same_relids
(
joined_
rels
);
}
#endif
root
->
join_rel_list
=
rels
=
joined_rels
;
}
#ifdef NOT_USED
Assert
(
BushyPlanFlag
||
length
(
rels
)
==
1
);
#endif
Assert
(
length
(
rels
)
==
1
);
#ifdef NOT_USED
if
(
BushyPlanFlag
)
return
get_cheapest_complete_rel
(
rels
);
if
(
!
BushyPlanFlag
)
return
lfirst
(
rels
);
else
#endif
return
lfirst
(
rels
);
return
get_cheapest_complete_rel
(
rels
);
}
/*****************************************************************************
...
...
src/backend/optimizer/path/joinrels.c
View file @
c82ca4c1
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.2
5 1999/02/15 05:21:05
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.2
6 1999/02/16 00:41:00
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -70,12 +70,11 @@ make_rels_by_joins(Query *root, List *outer_rels)
* Oops, we have a relation that is not joined to any other
* relation. Cartesian product time.
*/
#ifdef NOT_USED
if
(
BushyPlanFlag
)
joins
=
make_rels_by_clauseless_joins
(
outer_rel
,
outer_rels
);
if
(
!
BushyPlanFlag
)
joins
=
make_rels_by_clauseless_joins
(
outer_rel
,
root
->
base_rel_list
);
else
#endif
joins
=
make_rels_by_clauseless_joins
(
outer_rel
,
root
->
base_rel_list
);
joins
=
make_rels_by_clauseless_joins
(
outer_rel
,
outer_rels
);
}
join_list
=
nconc
(
join_list
,
joins
);
...
...
@@ -137,14 +136,12 @@ make_rels_by_clause_joins(Query *root, RelOptInfo *outer_rel,
joininfo
);
}
}
#ifdef NOT_USED
else
if
(
BushyPlanFlag
)
{
rel
=
make_join_rel
(
outer_rel
,
get_join_rel
(
root
,
unjoined_rels
),
joininfo
);
}
#endif
else
rel
=
NULL
;
...
...
@@ -246,10 +243,8 @@ make_join_rel(RelOptInfo *outer_rel, RelOptInfo *inner_rel, JoinInfo *joininfo)
if
(
joininfo
)
{
joinrel
->
restrictinfo
=
joininfo
->
jinfo_restrictinfo
;
#ifdef NOT_USED
if
(
BushyPlanFlag
)
joininfo
->
bushy_inactive
=
true
;
#endif
}
joinrel_joininfo_list
=
new_joininfo_list
(
append
(
outer_rel
->
joininfo
,
inner_rel
->
joininfo
),
...
...
@@ -471,7 +466,6 @@ add_rel_to_rel_joininfos(Query *root, List *joinrels, List *outerrels)
}
}
#ifdef NOT_USED
/*
* get_cheapest_complete_rel
* Find the join relation that includes all the original
...
...
@@ -515,7 +509,6 @@ get_cheapest_complete_rel(List *join_rel_list)
return
final_rel
;
}
#endif
/*
* add_superrels
...
...
src/backend/optimizer/path/prune.c
View file @
c82ca4c1
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/prune.c,v 1.3
5 1999/02/15 05:21:05
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/prune.c,v 1.3
6 1999/02/16 00:41:00
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -106,31 +106,6 @@ rels_set_cheapest(List *rel_list)
}
}
#ifdef NOT_USED
/*
* merge_rels_with_same_relids
* Given two lists of rel nodes that are already
* pruned, merge them into one pruned rel node list
*
* 'rel_list1' and
* 'rel_list2' are the rel node lists
*
* Returns one pruned rel node list
*/
List
*
merge_rels_with_same_relids
(
List
*
rel_list1
,
List
*
rel_list2
)
{
List
*
xrel
=
NIL
;
foreach
(
xrel
,
rel_list1
)
{
RelOptInfo
*
rel
=
(
RelOptInfo
*
)
lfirst
(
xrel
);
rel_list2
=
merge_rel_with_same_relids
(
rel
,
rel_list2
);
}
return
append
(
rel_list1
,
rel_list2
);
}
/*
* del_rels_all_bushy_inactive
* If all the joininfo's in a rel node are bushy_inactive,
...
...
@@ -175,5 +150,4 @@ del_rels_all_bushy_inactive(List *old_rels)
}
return
temp_list
;
}
#endif
src/backend/tcop/postgres.c
View file @
c82ca4c1
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.10
0 1999/02/15 03:22:2
1 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.10
1 1999/02/16 00:41:0
1 momjian Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
...
...
@@ -173,10 +173,8 @@ int UseNewLine = 0; /* Use EOF as query delimiters */
* plans
* ----------------
*/
#ifdef NOT_USED
int
BushyPlanFlag
=
0
;
/* default to false -- consider only
* left-deep trees */
#endif
/*
** Flags for expensive function optimization -- JMH 3/9/92
...
...
@@ -1043,7 +1041,6 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
#endif
break
;
#ifdef NOT_USED
case
'b'
:
/* ----------------
* set BushyPlanFlag to true.
...
...
@@ -1051,7 +1048,6 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
*/
BushyPlanFlag
=
1
;
break
;
#endif
case
'B'
:
/* ----------------
...
...
@@ -1542,7 +1538,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
if
(
!
IsUnderPostmaster
)
{
puts
(
"
\n
POSTGRES backend interactive interface "
);
puts
(
"$Revision: 1.10
0 $ $Date: 1999/02/15 03:22:2
1 $
\n
"
);
puts
(
"$Revision: 1.10
1 $ $Date: 1999/02/16 00:41:0
1 $
\n
"
);
}
/* ----------------
...
...
src/include/optimizer/internal.h
View file @
c82ca4c1
...
...
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: internal.h,v 1.1
5 1999/02/15 03:22:31
momjian Exp $
* $Id: internal.h,v 1.1
6 1999/02/16 00:41:03
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -80,9 +80,7 @@
#define FLOAT_EQUAL(X,Y) ((X) - (Y) < TOLERANCE)
#define FLOAT_IS_ZERO(X) (FLOAT_EQUAL(X,0.0))
#ifdef NOT_USED
extern
int
BushyPlanFlag
;
#endif
/* #define deactivate_joininfo(joininfo) joininfo->inactive=true*/
/*#define joininfo_inactive(joininfo) joininfo->inactive */
...
...
src/include/optimizer/paths.h
View file @
c82ca4c1
...
...
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: paths.h,v 1.
19 1999/02/15 05:28:10
momjian Exp $
* $Id: paths.h,v 1.
20 1999/02/16 00:41:03
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -85,11 +85,13 @@ extern List *make_rels_by_clauseless_joins(RelOptInfo *outer_rel,
List
*
inner_rels
);
extern
RelOptInfo
*
make_join_rel
(
RelOptInfo
*
outer_rel
,
RelOptInfo
*
inner_rel
,
JoinInfo
*
joininfo
);
extern
List
*
new_join_tlist
(
List
*
tlist
,
List
*
other_relids
,
int
first_resdomno
);
extern
RelOptInfo
*
get_cheapest_complete_rel
(
List
*
join_rel_list
);
/*
* prototypes for path/prune.c
*/
extern
void
merge_rels_with_same_relids
(
List
*
rel_list
);
extern
void
rels_set_cheapest
(
List
*
rel_list
);
extern
List
*
del_rels_all_bushy_inactive
(
List
*
old_rels
);
#endif
/* PATHS_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