mirror of
https://github.com/postgres/postgres.git
synced 2025-11-15 03:41:20 +03:00
Optimizer rename ClauseInfo -> RestrictInfo. Update optimizer README.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.15 1998/09/01 04:29:37 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.16 1999/02/03 20:15:33 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -224,7 +224,7 @@ init_join_rel(RelOptInfo * outer_rel, RelOptInfo * inner_rel, JoinInfo * joininf
|
||||
joinrel->classlist = NULL;
|
||||
joinrel->relam = InvalidOid;
|
||||
joinrel->ordering = NULL;
|
||||
joinrel->clauseinfo = NIL;
|
||||
joinrel->restrictinfo = NIL;
|
||||
joinrel->joininfo = NULL;
|
||||
joinrel->innerjoin = NIL;
|
||||
joinrel->superrels = NIL;
|
||||
@@ -238,7 +238,7 @@ init_join_rel(RelOptInfo * outer_rel, RelOptInfo * inner_rel, JoinInfo * joininf
|
||||
|
||||
if (joininfo)
|
||||
{
|
||||
joinrel->clauseinfo = joininfo->jinfoclauseinfo;
|
||||
joinrel->restrictinfo = joininfo->jinfo_restrictinfo;
|
||||
if (BushyPlanFlag)
|
||||
joininfo->inactive = true;
|
||||
}
|
||||
@@ -346,22 +346,18 @@ new_joininfo_list(List *joininfo_list, List *join_relids)
|
||||
current_joininfo_list);
|
||||
if (other_joininfo)
|
||||
{
|
||||
other_joininfo->jinfoclauseinfo =
|
||||
(List *) LispUnion(joininfo->jinfoclauseinfo,
|
||||
other_joininfo->jinfoclauseinfo);
|
||||
other_joininfo->jinfo_restrictinfo =
|
||||
(List *) LispUnion(joininfo->jinfo_restrictinfo,
|
||||
other_joininfo->jinfo_restrictinfo);
|
||||
}
|
||||
else
|
||||
{
|
||||
other_joininfo = makeNode(JoinInfo);
|
||||
|
||||
other_joininfo->otherrels =
|
||||
joininfo->otherrels;
|
||||
other_joininfo->jinfoclauseinfo =
|
||||
joininfo->jinfoclauseinfo;
|
||||
other_joininfo->mergejoinable =
|
||||
joininfo->mergejoinable;
|
||||
other_joininfo->hashjoinable =
|
||||
joininfo->hashjoinable;
|
||||
other_joininfo->otherrels = joininfo->otherrels;
|
||||
other_joininfo->jinfo_restrictinfo = joininfo->jinfo_restrictinfo;
|
||||
other_joininfo->mergejoinable = joininfo->mergejoinable;
|
||||
other_joininfo->hashjoinable = joininfo->hashjoinable;
|
||||
other_joininfo->inactive = false;
|
||||
|
||||
current_joininfo_list = lcons(other_joininfo,
|
||||
@@ -412,7 +408,7 @@ add_new_joininfos(Query *root, List *joinrels, List *outerrels)
|
||||
{
|
||||
JoinInfo *joininfo = (JoinInfo *) lfirst(xjoininfo);
|
||||
List *other_rels = joininfo->otherrels;
|
||||
List *clause_info = joininfo->jinfoclauseinfo;
|
||||
List *restrict_info = joininfo->jinfo_restrictinfo;
|
||||
bool mergejoinable = joininfo->mergejoinable;
|
||||
bool hashjoinable = joininfo->hashjoinable;
|
||||
|
||||
@@ -425,7 +421,7 @@ add_new_joininfos(Query *root, List *joinrels, List *outerrels)
|
||||
JoinInfo *new_joininfo = makeNode(JoinInfo);
|
||||
|
||||
new_joininfo->otherrels = joinrel->relids;
|
||||
new_joininfo->jinfoclauseinfo = clause_info;
|
||||
new_joininfo->jinfo_restrictinfo = restrict_info;
|
||||
new_joininfo->mergejoinable = mergejoinable;
|
||||
new_joininfo->hashjoinable = hashjoinable;
|
||||
new_joininfo->inactive = false;
|
||||
@@ -445,16 +441,16 @@ add_new_joininfos(Query *root, List *joinrels, List *outerrels)
|
||||
|
||||
if (other_joininfo)
|
||||
{
|
||||
other_joininfo->jinfoclauseinfo =
|
||||
(List *) LispUnion(clause_info,
|
||||
other_joininfo->jinfoclauseinfo);
|
||||
other_joininfo->jinfo_restrictinfo =
|
||||
(List *) LispUnion(restrict_info,
|
||||
other_joininfo->jinfo_restrictinfo);
|
||||
}
|
||||
else
|
||||
{
|
||||
JoinInfo *new_joininfo = makeNode(JoinInfo);
|
||||
|
||||
new_joininfo->otherrels = new_relids;
|
||||
new_joininfo->jinfoclauseinfo = clause_info;
|
||||
new_joininfo->jinfo_restrictinfo = restrict_info;
|
||||
new_joininfo->mergejoinable = mergejoinable;
|
||||
new_joininfo->hashjoinable = hashjoinable;
|
||||
new_joininfo->inactive = false;
|
||||
@@ -583,7 +579,7 @@ set_joinrel_size(RelOptInfo * joinrel, RelOptInfo * outer_rel, RelOptInfo * inne
|
||||
}
|
||||
else
|
||||
{
|
||||
selec = product_selec(jinfo->jinfoclauseinfo);
|
||||
selec = product_selec(jinfo->jinfo_restrictinfo);
|
||||
/* ntuples = Min(outer_rel->tuples,inner_rel->tuples) * selec; */
|
||||
ntuples = outer_rel->tuples * inner_rel->tuples * selec;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user