aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeSubplan.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2000-03-22 22:08:35 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2000-03-22 22:08:35 +0000
commit1d5e7a6f46f799628392fc4a024a3d61e3dd1630 (patch)
tree991172a18881641faae08ec32d986d280d45f602 /src/backend/executor/nodeSubplan.c
parentd825e55c1315baeea58a3752b86a2a1c4c77e03c (diff)
downloadpostgresql-1d5e7a6f46f799628392fc4a024a3d61e3dd1630.tar.gz
postgresql-1d5e7a6f46f799628392fc4a024a3d61e3dd1630.zip
Repair logic flaw in cost estimator: cost_nestloop() was estimating CPU
costs using the inner path's parent->rows count as the number of tuples processed per inner scan iteration. This is wrong when we are using an inner indexscan with indexquals based on join clauses, because the rows count in a Relation node reflects the selectivity of the restriction clauses for that rel only. Upshot was that if join clause was very selective, we'd drastically overestimate the true cost of the join. Fix is to calculate correct output-rows estimate for an inner indexscan when the IndexPath node is created and save it in the path node. Change of path node doesn't require initdb, since path nodes don't appear in saved rules.
Diffstat (limited to 'src/backend/executor/nodeSubplan.c')
0 files changed, 0 insertions, 0 deletions