aboutsummaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-02-27 21:44:44 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-02-27 21:44:44 +0000
commit5cfb44a82ee6854cb986534af3ac819592b963d5 (patch)
tree3f384fb77a806911a5ca5bced013cff5145f1740 /src/backend
parent36be19e3eded62d3aee4c907f5593b608076c8cd (diff)
downloadpostgresql-5cfb44a82ee6854cb986534af3ac819592b963d5.tar.gz
postgresql-5cfb44a82ee6854cb986534af3ac819592b963d5.zip
genericcostestimate() neglected to include qual startup cost in
indexTotalCost. I think this may not make any real difference in 7.4, but it definitely is a problem with CVS tip's new equation.
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/utils/adt/selfuncs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c
index 77986d4ca8b..34e4d767962 100644
--- a/src/backend/utils/adt/selfuncs.c
+++ b/src/backend/utils/adt/selfuncs.c
@@ -15,7 +15,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.147.2.2 2004/02/02 03:07:14 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.147.2.3 2004/02/27 21:44:44 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -3977,7 +3977,7 @@ genericcostestimate(Query *root, RelOptInfo *rel,
*/
cost_qual_eval(&index_qual_cost, indexQuals);
*indexStartupCost = index_qual_cost.startup;
- *indexTotalCost = numIndexPages +
+ *indexTotalCost = numIndexPages + index_qual_cost.startup +
(cpu_index_tuple_cost + index_qual_cost.per_tuple) * numIndexTuples;
/*