- Notifications
You must be signed in to change notification settings - Fork5
Commit8309d00
committed
Switch the planner over to treating qualifications of a JOIN_SEMI join as
though it is an inner rather than outer join type. This essentially meansthat we don't bother to separate "pushed down" qual conditions from actualjoin quals at a semijoin plan node; which is okay because the restrictions ofSQL syntax make it impossible to have a pushed-down qual that references theinner side of a semijoin. This allows noticeably better optimization ofIN/EXISTS cases than we had before, since the equivalence-class machinery cannow use those quals. Also fix a couple of other mistakes that had essentiallydisabled the ability to unique-ify the inner relation and then join it to justa subset of the left-hand relations. An example case using the regressiondatabase isselect * from tenk1 a, tenk1 bwhere (a.unique1,b.unique2) in (select unique1,unique2 from tenk1 c);which is planned reasonably well by 8.3 and earlier but had been forcing acartesian join of a/b in CVS HEAD.1 parent86422cb commit8309d00
File tree
6 files changed
+87
-34
lines changed- src
- backend/optimizer
- path
- plan
- include/nodes
6 files changed
+87
-34
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
2481 | 2481 | | |
2482 | 2482 | | |
2483 | 2483 | | |
2484 | | - | |
| 2484 | + | |
2485 | 2485 | | |
2486 | 2486 | | |
2487 | 2487 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
1647 | 1647 | | |
1648 | 1648 | | |
1649 | 1649 | | |
| 1650 | + | |
1650 | 1651 | | |
1651 | 1652 | | |
1652 | 1653 | | |
1653 | | - | |
1654 | 1654 | | |
1655 | 1655 | | |
1656 | 1656 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
744 | 744 | | |
745 | 745 | | |
746 | 746 | | |
| 747 | + | |
747 | 748 | | |
748 | 749 | | |
749 | 750 | | |
750 | 751 | | |
751 | 752 | | |
752 | | - | |
753 | 753 | | |
754 | 754 | | |
755 | 755 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
419 | 419 | | |
420 | 420 | | |
421 | 421 | | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
422 | 443 | | |
423 | 444 | | |
424 | 445 | | |
| |||
444 | 465 | | |
445 | 466 | | |
446 | 467 | | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
447 | 471 | | |
448 | 472 | | |
449 | | - | |
| 473 | + | |
| 474 | + | |
450 | 475 | | |
451 | 476 | | |
452 | 477 | | |
453 | 478 | | |
454 | 479 | | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
455 | 486 | | |
456 | 487 | | |
457 | 488 | | |
| |||
612 | 643 | | |
613 | 644 | | |
614 | 645 | | |
615 | | - | |
616 | | - | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
617 | 652 | | |
618 | | - | |
619 | | - | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
620 | 662 | | |
621 | | - | |
622 | | - | |
623 | | - | |
624 | 663 | | |
625 | 664 | | |
626 | 665 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
851 | 851 | | |
852 | 852 | | |
853 | 853 | | |
854 | | - | |
855 | | - | |
856 | | - | |
| 854 | + | |
857 | 855 | | |
858 | 856 | | |
859 | 857 | | |
860 | | - | |
861 | | - | |
862 | | - | |
863 | | - | |
| 858 | + | |
864 | 859 | | |
865 | 860 | | |
866 | 861 | | |
| |||
1062 | 1057 | | |
1063 | 1058 | | |
1064 | 1059 | | |
| 1060 | + | |
1065 | 1061 | | |
1066 | 1062 | | |
1067 | 1063 | | |
| |||
1076 | 1072 | | |
1077 | 1073 | | |
1078 | 1074 | | |
| 1075 | + | |
1079 | 1076 | | |
1080 | | - | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
1081 | 1087 | | |
1082 | | - | |
| 1088 | + | |
1083 | 1089 | | |
1084 | 1090 | | |
1085 | 1091 | | |
1086 | 1092 | | |
1087 | 1093 | | |
1088 | 1094 | | |
1089 | | - | |
| 1095 | + | |
1090 | 1096 | | |
1091 | 1097 | | |
1092 | 1098 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
542 | 542 | | |
543 | 543 | | |
544 | 544 | | |
545 | | - | |
546 | | - | |
547 | | - | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
548 | 549 | | |
549 | | - | |
550 | | - | |
551 | | - | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
552 | 556 | | |
553 | 557 | | |
554 | | - | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
555 | 563 | | |
556 | 564 | | |
0 commit comments
Comments
(0)