forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit65a7cd0
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 parente79518e commit65a7cd0
2 files changed
+43
-3
lines changedLines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
995 | 995 |
| |
996 | 996 |
| |
997 | 997 |
| |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
998 | 1003 |
| |
999 | 1004 |
| |
1000 | 1005 |
| |
|
Lines changed: 38 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
317 | 317 |
| |
318 | 318 |
| |
319 | 319 |
| |
| 320 | + | |
320 | 321 |
| |
321 | 322 |
| |
322 | 323 |
| |
| |||
325 | 326 |
| |
326 | 327 |
| |
327 | 328 |
| |
328 |
| - | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
329 | 341 |
| |
330 | 342 |
| |
331 | 343 |
| |
| |||
338 | 350 |
| |
339 | 351 |
| |
340 | 352 |
| |
341 |
| - | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
342 | 365 |
| |
343 | 366 |
| |
344 | 367 |
| |
| |||
353 | 376 |
| |
354 | 377 |
| |
355 | 378 |
| |
| 379 | + | |
356 | 380 |
| |
357 | 381 |
| |
358 | 382 |
| |
| |||
362 | 386 |
| |
363 | 387 |
| |
364 | 388 |
| |
365 |
| - | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
366 | 401 |
| |
367 | 402 |
| |
368 | 403 |
| |
|
0 commit comments
Comments
(0)