Cleanups of optimizer.
This commit is contained in:
parent
2d32d909b5
commit
956b91a944
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.20 1998/08/10 02:26:20 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.21 1998/08/10 04:49:36 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -117,12 +117,11 @@ find_rel_paths(Query *root, List *rels)
|
|||||||
|
|
||||||
sequential_scan_list = lcons(create_seqscan_path(rel), NIL);
|
sequential_scan_list = lcons(create_seqscan_path(rel), NIL);
|
||||||
|
|
||||||
rel_index_scan_list =
|
rel_index_scan_list = find_index_paths(root,
|
||||||
find_index_paths(root,
|
rel,
|
||||||
rel,
|
find_relation_indices(root, rel),
|
||||||
find_relation_indices(root, rel),
|
rel->clauseinfo,
|
||||||
rel->clauseinfo,
|
rel->joininfo);
|
||||||
rel->joininfo);
|
|
||||||
|
|
||||||
or_index_scan_list = create_or_index_paths(root, rel, rel->clauseinfo);
|
or_index_scan_list = create_or_index_paths(root, rel, rel->clauseinfo);
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.26 1998/08/10 02:26:22 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.27 1998/08/10 04:49:37 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -602,7 +602,6 @@ match_clause_to_indexkey(RelOptInfo *rel,
|
|||||||
*/
|
*/
|
||||||
if (!join)
|
if (!join)
|
||||||
{
|
{
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check for standard s-argable clause
|
* Check for standard s-argable clause
|
||||||
*/
|
*/
|
||||||
@ -610,12 +609,11 @@ match_clause_to_indexkey(RelOptInfo *rel,
|
|||||||
(rightop && IsA(rightop, Param)))
|
(rightop && IsA(rightop, Param)))
|
||||||
{
|
{
|
||||||
restrict_op = ((Oper *) ((Expr *) clause)->oper)->opno;
|
restrict_op = ((Oper *) ((Expr *) clause)->oper)->opno;
|
||||||
isIndexable =
|
isIndexable = (op_class(restrict_op, xclass, index->relam) &&
|
||||||
(op_class(restrict_op, xclass, index->relam) &&
|
IndexScanableOperand(leftop,
|
||||||
IndexScanableOperand(leftop,
|
indexkey,
|
||||||
indexkey,
|
rel,
|
||||||
rel,
|
index));
|
||||||
index));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.25 1998/08/10 02:26:28 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.26 1998/08/10 04:49:39 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -276,6 +276,7 @@ subplanner(Query *root,
|
|||||||
* the exhaustive path search.
|
* the exhaustive path search.
|
||||||
*/
|
*/
|
||||||
init_join_info(root->base_rel_list);
|
init_join_info(root->base_rel_list);
|
||||||
|
|
||||||
final_rel_list = find_paths(root, root->base_rel_list);
|
final_rel_list = find_paths(root, root->base_rel_list);
|
||||||
|
|
||||||
if (final_rel_list)
|
if (final_rel_list)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user