Fix oversight in planning for multiple indexscans driven by
Tom Lane <tgl@sss.pgh.pa.us>
Fix oversight in planning for multiple indexscans driven by ScalarArrayOpExpr index quals: we were estimating the right total number of rows returned, but treating the index-access part of the cost as if a single scan were fetching that many consecutive index tuples. Actually we should treat it as a multiple indexscan, and if there are enough of 'em the Mackert-Lohman discount should kick in.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/optimizer/path/costsize.c | modified | +1 −30 |
| src/backend/utils/adt/selfuncs.c | modified | +81 −8 |
| src/include/utils/selfuncs.h | modified | +2 −1 |