- Notifications
You must be signed in to change notification settings - Fork28
Commit25e46a5
committed
Fix a couple of oversights associated with the "physical tlist" optimization:
we had several code paths where a physical tlist could be used for the inputto a Sort node, which is a dumb idea because any unneeded table columns willincrease the volume of data the sort has to push around.(Unfortunately the easy-looking fix of calling disuse_physical_tlist duringmake_sort_xxx doesn't work because in most cases we're already committed tothe current input tlist --- it's been marked with sort column numbers, orwe've built grouping column numbers using it, etc. The tlist has to beselected properly at the calling level before we start constructing sort-colinformation. This is easy enough to do, we were just failing to take thepoint into consideration.)Back-patch to 8.3. I believe the problem probably exists clear back to 7.4when the physical tlist optimization was added, but I'm afraid to back-patchfurther than 8.3 without a great deal more study than I want to put into it.The code in this area has drifted a lot over time. The real-world importanceof these code paths is uncertain anyway --- I think in many cases we'dprobably prefer hash-based methods.1 parentc5c7ba1 commit25e46a5
File tree
3 files changed
+27
-12
lines changed- src
- backend/optimizer/plan
- include/optimizer
3 files changed
+27
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
118 | 119 | | |
119 | 120 | | |
120 | 121 | | |
| |||
616 | 617 | | |
617 | 618 | | |
618 | 619 | | |
619 | | - | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
620 | 623 | | |
621 | | - | |
| 624 | + | |
622 | 625 | | |
623 | 626 | | |
624 | | - | |
| 627 | + | |
625 | 628 | | |
626 | 629 | | |
627 | 630 | | |
| |||
669 | 672 | | |
670 | 673 | | |
671 | 674 | | |
672 | | - | |
| 675 | + | |
673 | 676 | | |
674 | 677 | | |
675 | 678 | | |
| |||
2850 | 2853 | | |
2851 | 2854 | | |
2852 | 2855 | | |
2853 | | - | |
| 2856 | + | |
2854 | 2857 | | |
2855 | 2858 | | |
2856 | 2859 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
957 | 957 | | |
958 | 958 | | |
959 | 959 | | |
| 960 | + | |
| 961 | + | |
960 | 962 | | |
961 | 963 | | |
962 | 964 | | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
963 | 977 | | |
964 | 978 | | |
965 | 979 | | |
| |||
1054 | 1068 | | |
1055 | 1069 | | |
1056 | 1070 | | |
1057 | | - | |
1058 | | - | |
| 1071 | + | |
1059 | 1072 | | |
1060 | 1073 | | |
1061 | 1074 | | |
| |||
1098 | 1111 | | |
1099 | 1112 | | |
1100 | 1113 | | |
1101 | | - | |
| 1114 | + | |
1102 | 1115 | | |
1103 | 1116 | | |
1104 | 1117 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | 56 | | |
58 | 57 | | |
59 | 58 | | |
| |||
0 commit comments
Comments
(0)