Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3e9960e

Browse files
committed
Revert ill-considered change of index-size fudge factor.
This partially reverts commit21a39de,restoring the pre-9.2 cost estimates for index usage. That changeintroduced much too large a bias against larger indexes, as per reportsfrom Jeff Janes and others. The whole thing needs a rewrite, which I'vedone in HEAD, but the safest thing to do in 9.2 is just to undo thismultiplier change.
1 parent0b3c54a commit3e9960e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/backend/utils/adt/selfuncs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6130,11 +6130,11 @@ genericcostestimate(PlannerInfo *root,
61306130
*
61316131
* We can deal with this by adding a very small "fudge factor" that
61326132
* depends on the index size. The fudge factor used here is one
6133-
* spc_random_page_cost per10000 index pages, which should be small
6133+
* spc_random_page_cost per100000 index pages, which should be small
61346134
* enough to not alter index-vs-seqscan decisions, but will prevent
61356135
* indexes of different sizes from looking exactly equally attractive.
61366136
*/
6137-
*indexTotalCost+=index->pages*spc_random_page_cost /10000.0;
6137+
*indexTotalCost+=index->pages*spc_random_page_cost /100000.0;
61386138

61396139
/*
61406140
* CPU cost: any complex expressions in the indexquals will need to be

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp