mirror of
https://github.com/postgres/postgres.git
synced 2025-08-28 18:48:04 +03:00
Optimizer cleanup.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.37 1999/02/03 21:16:26 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.38 1999/02/05 19:59:26 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -56,7 +56,7 @@ static List *group_clauses_by_indexkey(RelOptInfo * rel, RelOptInfo * index,
|
||||
static List *group_clauses_by_ikey_for_joins(RelOptInfo * rel, RelOptInfo * index,
|
||||
int *indexkeys, Oid *classes, List *join_cinfo_list, List *restr_cinfo_list);
|
||||
static RestrictInfo *match_clause_to_indexkey(RelOptInfo * rel, RelOptInfo * index, int indexkey,
|
||||
int xclass, RestrictInfo * clauseInfo, bool join);
|
||||
int xclass, RestrictInfo * restrictInfo, bool join);
|
||||
static bool pred_test(List *predicate_list, List *restrictinfo_list,
|
||||
List *joininfo_list);
|
||||
static bool one_pred_test(Expr *predicate, List *restrictinfo_list);
|
||||
@@ -571,14 +571,14 @@ group_clauses_by_ikey_for_joins(RelOptInfo * rel,
|
||||
*
|
||||
*/
|
||||
static RestrictInfo *
|
||||
match_clause_to_indexkey(RelOptInfo * rel,
|
||||
RelOptInfo * index,
|
||||
match_clause_to_indexkey(RelOptInfo *rel,
|
||||
RelOptInfo *index,
|
||||
int indexkey,
|
||||
int xclass,
|
||||
RestrictInfo * clauseInfo,
|
||||
RestrictInfo *restrictInfo,
|
||||
bool join)
|
||||
{
|
||||
Expr *clause = clauseInfo->clause;
|
||||
Expr *clause = restrictInfo->clause;
|
||||
Var *leftop,
|
||||
*rightop;
|
||||
Oid join_op = InvalidOid;
|
||||
@@ -761,7 +761,7 @@ match_clause_to_indexkey(RelOptInfo * rel,
|
||||
}
|
||||
|
||||
if (isIndexable)
|
||||
return clauseInfo;
|
||||
return restrictInfo;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@@ -1208,7 +1208,7 @@ indexable_joinclauses(RelOptInfo * rel, RelOptInfo * index,
|
||||
{
|
||||
List *clauses = lfirst(clausegroups);
|
||||
|
||||
((RestrictInfo *) lfirst(clauses))->cinfojoinid = joininfo->otherrels;
|
||||
((RestrictInfo *) lfirst(clauses))->restrictinfojoinid = joininfo->otherrels;
|
||||
}
|
||||
cg_list = nconc(cg_list, clausegroups);
|
||||
}
|
||||
@@ -1298,7 +1298,7 @@ index_innerjoin(Query *root, RelOptInfo * rel, List *clausegroup_list,
|
||||
pathnode->indexkeys = index->indexkeys;
|
||||
pathnode->indexqual = clausegroup;
|
||||
|
||||
pathnode->path.joinid = ((RestrictInfo *) lfirst(clausegroup))->cinfojoinid;
|
||||
pathnode->path.joinid = ((RestrictInfo *) lfirst(clausegroup))->restrictinfojoinid;
|
||||
|
||||
pathnode->path.path_cost = cost_index((Oid) lfirsti(index->relids),
|
||||
(int) temp_pages,
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/prune.c,v 1.21 1999/02/05 03:43:05 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/prune.c,v 1.22 1999/02/05 19:59:26 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -64,9 +64,9 @@ prune_joinrel(RelOptInfo *rel, List *other_rels)
|
||||
List *r1 = NIL;
|
||||
List *result = NIL;
|
||||
|
||||
foreach(r1, other_rels)
|
||||
foreach(i, other_rels)
|
||||
{
|
||||
RelOptInfo *other_rel = (RelOptInfo *) lfirst(r1);
|
||||
RelOptInfo *other_rel = (RelOptInfo *) lfirst(i);
|
||||
|
||||
if (same(rel->relids, other_rel->relids))
|
||||
/*
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.36 1999/02/03 21:16:30 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.37 1999/02/05 19:59:27 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -321,7 +321,7 @@ create_indexscan_node(IndexPath *best_path,
|
||||
|
||||
/*
|
||||
* Extract the(first if conjunct, only if disjunct) clause from the
|
||||
* clauseinfo list.
|
||||
* restrictinfo list.
|
||||
*/
|
||||
Expr *index_clause = (Expr *) NULL;
|
||||
List *indxqual = NIL;
|
||||
|
@@ -4,7 +4,7 @@
|
||||
# Makefile for optimizer/util
|
||||
#
|
||||
# IDENTIFICATION
|
||||
# $Header: /cvsroot/pgsql/src/backend/optimizer/util/Makefile,v 1.7 1998/07/20 20:01:48 momjian Exp $
|
||||
# $Header: /cvsroot/pgsql/src/backend/optimizer/util/Makefile,v 1.8 1999/02/05 19:59:28 momjian Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@@ -13,7 +13,7 @@ include ../../../Makefile.global
|
||||
|
||||
CFLAGS += -I../..
|
||||
|
||||
OBJS = clauseinfo.o clauses.o indexnode.o plancat.o \
|
||||
OBJS = restrictinfo.o clauses.o indexnode.o plancat.o \
|
||||
joininfo.o keys.o ordering.o pathnode.o relnode.o tlist.o var.o
|
||||
|
||||
# not ready yet: predmig.o xfunc.o
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/ordering.c,v 1.9 1999/02/03 21:16:51 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/ordering.c,v 1.10 1999/02/05 19:59:30 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -44,7 +44,7 @@ equal_path_path_ordering(PathOrder *path_ordering1,
|
||||
path_ordering2->ordtype == SORTOP_ORDER)
|
||||
{
|
||||
return (equal_sortops_order(path_ordering1->ord.sortop,
|
||||
path_ordering2->ord.sortop));
|
||||
path_ordering2->ord.sortop));
|
||||
}
|
||||
else if (path_ordering1->ordtype == MERGE_ORDER &&
|
||||
path_ordering2->ordtype == SORTOP_ORDER)
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/clauseinfo.c,v 1.11 1999/02/03 21:16:50 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/restrictinfo.c,v 1.1 1999/02/05 19:59:31 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
Reference in New Issue
Block a user