Fix cost_nestloop and cost_hashjoin to model the behavior of semi and anti
Tom Lane <tgl@sss.pgh.pa.us>
Fix cost_nestloop and cost_hashjoin to model the behavior of semi and anti joins a bit better, ie, understand the differing cost functions for matched and unmatched outer tuples. There is more that could be done in cost_hashjoin but this already helps a great deal. Per discussions with Robert Haas.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/optimizer/path/costsize.c | modified | +297 −25 |
| src/backend/optimizer/plan/createplan.c | modified | +11 −57 |
| src/backend/optimizer/util/restrictinfo.c | modified | +78 −13 |
| src/include/optimizer/restrictinfo.h | modified | +2 −2 |