diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2013-01-11 13:08:19 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2013-01-11 13:08:19 -0500 |
commit | 3e9960e9d935e7e7c12e78441f99befc877563ef (patch) | |
tree | 1b888a42b8efd81cf680bedb65688ef029aec451 | |
parent | 0b3c54aac774bb32ffc6816a164a8b7804663c87 (diff) | |
download | postgresql-3e9960e9d935e7e7c12e78441f99befc877563ef.tar.gz postgresql-3e9960e9d935e7e7c12e78441f99befc877563ef.zip |
Revert ill-considered change of index-size fudge factor.
This partially reverts commit 21a39de5809cd3050a37d2554323cc1d0cbeed9d,
restoring the pre-9.2 cost estimates for index usage. That change
introduced much too large a bias against larger indexes, as per reports
from Jeff Janes and others. The whole thing needs a rewrite, which I've
done in HEAD, but the safest thing to do in 9.2 is just to undo this
multiplier change.
-rw-r--r-- | src/backend/utils/adt/selfuncs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c index fb91d140261..4b1229484ee 100644 --- a/src/backend/utils/adt/selfuncs.c +++ b/src/backend/utils/adt/selfuncs.c @@ -6130,11 +6130,11 @@ genericcostestimate(PlannerInfo *root, * * We can deal with this by adding a very small "fudge factor" that * depends on the index size. The fudge factor used here is one - * spc_random_page_cost per 10000 index pages, which should be small + * spc_random_page_cost per 100000 index pages, which should be small * enough to not alter index-vs-seqscan decisions, but will prevent * indexes of different sizes from looking exactly equally attractive. */ - *indexTotalCost += index->pages * spc_random_page_cost / 10000.0; + *indexTotalCost += index->pages * spc_random_page_cost / 100000.0; /* * CPU cost: any complex expressions in the indexquals will need to be |