mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-24 18:55:04 +08:00
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.
This commit is contained in:
parent
f5d8f0bb19
commit
df79b847fe
@ -15,7 +15,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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... */
|
if (qual_arg_cost < 0) /* just in case... */
|
||||||
qual_arg_cost = 0;
|
qual_arg_cost = 0;
|
||||||
*indexStartupCost = qual_arg_cost;
|
*indexStartupCost = qual_arg_cost;
|
||||||
|
*indexTotalCost += qual_arg_cost;
|
||||||
*indexTotalCost += numIndexTuples * (cpu_index_tuple_cost + qual_op_cost);
|
*indexTotalCost += numIndexTuples * (cpu_index_tuple_cost + qual_op_cost);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user