Skip to content

Commit df79b84

Browse files
committed
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.
1 parent f5d8f0b commit df79b84

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/backend/utils/adt/selfuncs.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
*
1717
* IDENTIFICATION
18-
* $PostgreSQL: pgsql/src/backend/utils/adt/selfuncs.c,v 1.157 2004/02/17 00:52:53 tgl Exp $
18+
* $PostgreSQL: pgsql/src/backend/utils/adt/selfuncs.c,v 1.158 2004/02/27 21:44:34 tgl Exp $
1919
*
2020
*-------------------------------------------------------------------------
2121
*/
@@ -4259,6 +4259,7 @@ genericcostestimate(Query *root, RelOptInfo *rel,
42594259
if (qual_arg_cost < 0) /* just in case... */
42604260
qual_arg_cost = 0;
42614261
*indexStartupCost = qual_arg_cost;
4262+
*indexTotalCost += qual_arg_cost;
42624263
*indexTotalCost += numIndexTuples * (cpu_index_tuple_cost + qual_op_cost);
42634264

42644265
/*

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy