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

Commitb989619

Browse files
committed
Fix cost estimation for indexscans on expensive indexed expressions.
genericcostestimate() and friends used the cost of the entire indexqualexpressions as the charge for initial evaluation of indexscan arguments.But of course the index column is not evaluated, only the other sideof the qual expression, so this was a bad overestimate if the indexcolumn was an expensive expression.To fix, refactor the logic in this area so that there's a single routinecharged with deconstructing index quals and figuring out what is the indexcolumn and what is the comparison expression. This is more or less free inthe case of btree indexes, since btcostestimate() was doing equivalentdeconstruction already. It probably adds a bit of new overhead in the casesof other index types, but not a lot. (In the case of GIN I think I savedsomething by getting rid of code that wasn't aware that the index columnassociations were already available "for free".)Per recent gripe from Jeff Janes.Arguably this is a bug fix, but I'm hesitant to back-patch because of thepossibility of destabilizing plan choices that people may be happy with.
1 parentf8b031b commitb989619

File tree

1 file changed

+244
-147
lines changed

1 file changed

+244
-147
lines changed

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp