From df79b847fe8e81ede30a4ef77a1c903d1cb211cf Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 27 Feb 2004 21:44:34 +0000 Subject: [PATCH] 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. --- src/backend/utils/adt/selfuncs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c index 0547391409..ded7260c78 100644 --- a/src/backend/utils/adt/selfuncs.c +++ b/src/backend/utils/adt/selfuncs.c @@ -15,7 +15,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/adt/selfuncs.c,v 1.157 2004/02/17 00:52:53 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/utils/adt/selfuncs.c,v 1.158 2004/02/27 21:44:34 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -4259,6 +4259,7 @@ genericcostestimate(Query *root, RelOptInfo *rel, if (qual_arg_cost < 0) /* just in case... */ qual_arg_cost = 0; *indexStartupCost = qual_arg_cost; + *indexTotalCost += qual_arg_cost; *indexTotalCost += numIndexTuples * (cpu_index_tuple_cost + qual_op_cost); /*