]> granicus.if.org Git - postgresql/commitdiff
genericcostestimate() neglected to include qual startup cost in
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 27 Feb 2004 21:44:34 +0000 (21:44 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 27 Feb 2004 21:44:34 +0000 (21:44 +0000)
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

index 054739140970a5de8805e59ee5f37e293d2778bc..ded7260c784d1c2356dd60802a4489f52d93cff5 100644 (file)
@@ -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);
 
        /*