1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-15 03:41:20 +03:00

Optimizer cleanup.

This commit is contained in:
Bruce Momjian
1999-02-08 04:29:25 +00:00
parent 07c33ba79e
commit 54e5d25666
15 changed files with 88 additions and 80 deletions

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.38 1999/02/05 19:59:26 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.39 1999/02/08 04:29:08 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1290,8 +1290,8 @@ index_innerjoin(Query *root, RelOptInfo * rel, List *clausegroup_list,
pathnode->path.pathtype = T_IndexScan;
pathnode->path.parent = rel;
pathnode->path.p_ordering.ordtype = SORTOP_ORDER;
pathnode->path.p_ordering.ord.sortop = index->ordering;
pathnode->path.path_order.ordtype = SORTOP_ORDER;
pathnode->path.path_order.ord.sortop = index->ordering;
pathnode->path.keys = NIL; /* not sure about this, bjm 1998/09/21 */
pathnode->indexid = index->relids;

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinpath.c,v 1.14 1999/02/04 03:19:08 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinpath.c,v 1.15 1999/02/08 04:29:11 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -328,7 +328,7 @@ match_unsorted_outer(RelOptInfo * joinrel,
outerpath = (Path *) lfirst(i);
outerpath_ordering = &outerpath->p_ordering;
outerpath_ordering = &outerpath->path_order;
if (outerpath_ordering)
{
@@ -471,7 +471,7 @@ match_unsorted_inner(RelOptInfo * joinrel,
innerpath = (Path *) lfirst(i);
innerpath_ordering = &innerpath->p_ordering;
innerpath_ordering = &innerpath->path_order;
if (innerpath_ordering)
{

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/joinutils.c,v 1.10 1999/02/06 17:29:26 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/joinutils.c,v 1.11 1999/02/08 04:29:12 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -219,7 +219,7 @@ match_paths_joinkeys(List *joinkeys,
key_match = every_func(joinkeys, path->keys, which_subkey);
if (equal_path_ordering(ordering,
&path->p_ordering) &&
&path->path_order) &&
length(joinkeys) == length(path->keys) &&
key_match)
{

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/mergeutils.c,v 1.13 1999/02/06 17:29:26 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/mergeutils.c,v 1.14 1999/02/08 04:29:12 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -52,16 +52,16 @@ group_clauses_by_order(List *restrictinfo_list,
* Create a new mergeinfo node and add it to 'mergeinfo-list'
* if one does not yet exist for this merge ordering.
*/
PathOrder p_ordering;
PathOrder path_order;
MergeInfo *xmergeinfo;
Expr *clause = restrictinfo->clause;
Var *leftop = get_leftop(clause);
Var *rightop = get_rightop(clause);
JoinKey *keys;
p_ordering.ordtype = MERGE_ORDER;
p_ordering.ord.merge = merge_ordering;
xmergeinfo = match_order_mergeinfo(&p_ordering, mergeinfo_list);
path_order.ordtype = MERGE_ORDER;
path_order.ord.merge = merge_ordering;
xmergeinfo = match_order_mergeinfo(&path_order, mergeinfo_list);
if (inner_relid == leftop->varno)
{
keys = makeNode(JoinKey);

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/orindxpath.c,v 1.14 1999/02/03 21:16:28 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/orindxpath.c,v 1.15 1999/02/08 04:29:12 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -104,13 +104,13 @@ create_or_index_paths(Query *root,
pathnode->path.pathtype = T_IndexScan;
pathnode->path.parent = rel;
pathnode->path.p_ordering.ordtype = SORTOP_ORDER;
pathnode->path.path_order.ordtype = SORTOP_ORDER;
/*
* This is an IndexScan, but it does index lookups based
* on the order of the fields specified in the WHERE clause,
* not in any order, so the sortop is NULL.
*/
pathnode->path.p_ordering.ord.sortop = NULL;
pathnode->path.path_order.ord.sortop = NULL;
pathnode->path.keys = NIL; /* not sure about this, bjm 1998/09/21 */
pathnode->indexqual = lcons(clausenode, NIL);

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/prune.c,v 1.23 1999/02/05 20:34:11 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/prune.c,v 1.24 1999/02/08 04:29:12 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -109,7 +109,7 @@ prune_rel_paths(List *rel_list)
{
path = (Path *) lfirst(y);
if (!path->p_ordering.ord.sortop)
if (!path->path_order.ord.sortop)
break;
}
cheapest = (JoinPath *) prune_rel_path(rel, path);