You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Repair logic flaw in cost estimator: cost_nestloop() was estimating CPU
costs using the inner path's parent->rows count as the number of tuplesprocessed per inner scan iteration. This is wrong when we are using aninner indexscan with indexquals based on join clauses, because the rowscount in a Relation node reflects the selectivity of the restrictionclauses for that rel only. Upshot was that if join clause was veryselective, we'd drastically overestimate the true cost of the join.Fix is to calculate correct output-rows estimate for an inner indexscanwhen the IndexPath node is created and save it in the path node.Change of path node doesn't require initdb, since path nodes don'tappear in saved rules.