forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit7f3eba3
committed
When estimating without benefit of MCV lists (suggesting that one or both
inputs is unique or nearly so), make eqjoinsel() clamp the ndistinct estimatesto be not more than the estimated number of rows coming from the inputrelations. This allows the estimate to change in response to the selectivityof restriction conditions on the inputs.This is a pretty narrow patch and maybe we should be more aggressive aboutsimilarly clamping ndistinct in other cases; but I'm worried aboutdouble-counting the effects of the restriction conditions. However, it seemsto help for the case exhibited by Grzegorz Jaskiewicz (antijoin against asmall subset of a relation), so let's try this for awhile.1 parent31468d0 commit7f3eba3
1 file changed
+18
-1
lines changedLines changed: 18 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
18 |
| - | |
| 18 | + | |
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
| |||
2143 | 2143 |
| |
2144 | 2144 |
| |
2145 | 2145 |
| |
| 2146 | + | |
| 2147 | + | |
| 2148 | + | |
| 2149 | + | |
| 2150 | + | |
| 2151 | + | |
| 2152 | + | |
2146 | 2153 |
| |
2147 | 2154 |
| |
2148 | 2155 |
| |
2149 | 2156 |
| |
| 2157 | + | |
| 2158 | + | |
| 2159 | + | |
| 2160 | + | |
| 2161 | + | |
2150 | 2162 |
| |
2151 | 2163 |
| |
2152 | 2164 |
| |
| |||
2305 | 2317 |
| |
2306 | 2318 |
| |
2307 | 2319 |
| |
| 2320 | + | |
| 2321 | + | |
| 2322 | + | |
| 2323 | + | |
| 2324 | + | |
2308 | 2325 |
| |
2309 | 2326 |
| |
2310 | 2327 |
| |
|
0 commit comments
Comments
(0)