- Notifications
You must be signed in to change notification settings - Fork5
Commit92c0bf0
committed
Avoid uselessly building a duplicate of the original clause in trivial cases
where the EquivalenceClass machinery is unable to deduce anything more from asimple "var = const" qual clause. There are probably some more cases wherethis could be done, but this seems to take care of most of the added overheadfor simple queries. Per gripe from Guillaume Smet.In passing, fix a problem that was exposed by this change:reconsider_outer_join_clause and friends were passing the wrong relids tobuild_implied_join_equality, resulting in RestrictInfos with the wrongrequired_relids. This mistake was masked in typical cases since the bogusRestrictInfos would never have escaped from the EquivalenceClass machinery,but I think there might be corner cases involving "broken" ECs where therewould have been a visible failure even without the new optimization. In anycase the code was certainly not operating as intended.1 parent335d9af commit92c0bf0
1 file changed
+32
-5
lines changedLines changed: 32 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
13 |
| - | |
| 13 | + | |
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
| |||
559 | 559 |
| |
560 | 560 |
| |
561 | 561 |
| |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
562 | 581 |
| |
563 | 582 |
| |
564 | 583 |
| |
| |||
1047 | 1066 |
| |
1048 | 1067 |
| |
1049 | 1068 |
| |
1050 |
| - | |
| 1069 | + | |
| 1070 | + | |
1051 | 1071 |
| |
1052 | 1072 |
| |
1053 | 1073 |
| |
| |||
1165 | 1185 |
| |
1166 | 1186 |
| |
1167 | 1187 |
| |
| 1188 | + | |
1168 | 1189 |
| |
1169 | 1190 |
| |
1170 | 1191 |
| |
| |||
1176 | 1197 |
| |
1177 | 1198 |
| |
1178 | 1199 |
| |
| 1200 | + | |
1179 | 1201 |
| |
1180 | 1202 |
| |
1181 | 1203 |
| |
1182 | 1204 |
| |
1183 | 1205 |
| |
1184 | 1206 |
| |
| 1207 | + | |
1185 | 1208 |
| |
1186 | 1209 |
| |
1187 | 1210 |
| |
| |||
1237 | 1260 |
| |
1238 | 1261 |
| |
1239 | 1262 |
| |
1240 |
| - | |
| 1263 | + | |
1241 | 1264 |
| |
1242 | 1265 |
| |
1243 | 1266 |
| |
| |||
1268 | 1291 |
| |
1269 | 1292 |
| |
1270 | 1293 |
| |
| 1294 | + | |
| 1295 | + | |
1271 | 1296 |
| |
1272 | 1297 |
| |
1273 | 1298 |
| |
| |||
1276 | 1301 |
| |
1277 | 1302 |
| |
1278 | 1303 |
| |
| 1304 | + | |
| 1305 | + | |
1279 | 1306 |
| |
1280 | 1307 |
| |
1281 | 1308 |
| |
| |||
1357 | 1384 |
| |
1358 | 1385 |
| |
1359 | 1386 |
| |
1360 |
| - | |
| 1387 | + | |
1361 | 1388 |
| |
1362 | 1389 |
| |
1363 | 1390 |
| |
| |||
1369 | 1396 |
| |
1370 | 1397 |
| |
1371 | 1398 |
| |
1372 |
| - | |
| 1399 | + | |
1373 | 1400 |
| |
1374 | 1401 |
| |
1375 | 1402 |
| |
|
0 commit comments
Comments
(0)