From 71ed7eb4941ddb32700a51a8b8b3403eceeca4a9 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sat, 22 Jan 2000 23:50:30 +0000 Subject: Revise handling of index-type-specific indexscan cost estimation, per pghackers discussion of 5-Jan-2000. The amopselect and amopnpages estimators are gone, and in their place is a per-AM amcostestimate procedure (linked to from pg_am, not pg_amop). --- src/backend/optimizer/path/orindxpath.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'src/backend/optimizer/path/orindxpath.c') diff --git a/src/backend/optimizer/path/orindxpath.c b/src/backend/optimizer/path/orindxpath.c index f5813a27a8e..2831342fd88 100644 --- a/src/backend/optimizer/path/orindxpath.c +++ b/src/backend/optimizer/path/orindxpath.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/orindxpath.c,v 1.33 2000/01/09 00:26:33 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/orindxpath.c,v 1.34 2000/01/22 23:50:15 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -215,21 +215,11 @@ best_or_subclause_index(Query *root, foreach(ilist, indices) { IndexOptInfo *index = (IndexOptInfo *) lfirst(ilist); - long npages; - Selectivity selec; Cost subcost; Assert(IsA(index, IndexOptInfo)); - index_selectivity(root, - rel, - index, - indexqual, - &npages, - &selec); - - subcost = cost_index(rel, index, - npages, selec, + subcost = cost_index(root, rel, index, indexqual, false); if (first_run || subcost < *retCost) -- cgit v1.2.3