- Notifications
You must be signed in to change notification settings - Fork5
Commitdcc685d
committed
Fix pull_up_sublinks' failure to handle nested pull-up opportunities.
After finding an EXISTS or ANY sub-select that can be converted to asemi-join or anti-join, we should recurse into the body of the sub-select.This allows cases such as EXISTS-within-EXISTS to be optimized properly.The original coding would leave the lower sub-select as a SubLink, whichis no better and often worse than what we can do with a join. Per examplefrom Wayne Conrad.Back-patch to 8.4. There is a related issue in older versions' handlingof pull_up_IN_clauses, but they're lame enough anyway about the whole areathat it seems not worth the extra work to try to fix.1 parent52897e5 commitdcc685d
2 files changed
+43
-3
lines changedLines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1065 | 1065 |
| |
1066 | 1066 |
| |
1067 | 1067 |
| |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
1068 | 1073 |
| |
1069 | 1074 |
| |
1070 | 1075 |
| |
|
Lines changed: 38 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
318 | 318 |
| |
319 | 319 |
| |
320 | 320 |
| |
| 321 | + | |
321 | 322 |
| |
322 | 323 |
| |
323 | 324 |
| |
| |||
326 | 327 |
| |
327 | 328 |
| |
328 | 329 |
| |
329 |
| - | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
330 | 342 |
| |
331 | 343 |
| |
332 | 344 |
| |
| |||
339 | 351 |
| |
340 | 352 |
| |
341 | 353 |
| |
342 |
| - | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
343 | 366 |
| |
344 | 367 |
| |
345 | 368 |
| |
| |||
354 | 377 |
| |
355 | 378 |
| |
356 | 379 |
| |
| 380 | + | |
357 | 381 |
| |
358 | 382 |
| |
359 | 383 |
| |
| |||
363 | 387 |
| |
364 | 388 |
| |
365 | 389 |
| |
366 |
| - | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
367 | 402 |
| |
368 | 403 |
| |
369 | 404 |
| |
|
0 commit comments
Comments
(0)