Commit f1f5ec1
committed
Reuse abbreviated keys in ordered [set] aggregates.
When processing ordered aggregates following a sort that could make use
of the abbreviated key optimization, only call the equality operator to
compare successive pairs of tuples when their abbreviated keys were not
equal.
Peter Geoghegan, reviewd by Andreas Karlsson and by me.1 parent 66f5038 commit f1f5ec1Copy full SHA for f1f5ec1
File tree
Expand file treeCollapse file tree
6 files changed
+92
-39
lines changedOpen diff view settings
Filter options
- src
- backend
- catalog
- executor
- utils
- adt
- sort
- include/utils
Expand file treeCollapse file tree
6 files changed
+92
-39
lines changedOpen diff view settings
Collapse file
src/backend/catalog/index.c
Copy file name to clipboardExpand all lines: src/backend/catalog/index.c+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
3063 | 3063 | |
3064 | 3064 | |
3065 | 3065 | |
3066 | | - |
| 3066 | + |
3067 | 3067 | |
3068 | 3068 | |
3069 | 3069 | |
|
Collapse file
src/backend/executor/nodeAgg.c
Copy file name to clipboardExpand all lines: src/backend/executor/nodeAgg.c+13-3Lines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
575 | 575 | |
576 | 576 | |
577 | 577 | |
578 | | - |
| 578 | + |
| 579 | + |
579 | 580 | |
580 | 581 | |
581 | 582 | |
| ||
1076 | 1077 | |
1077 | 1078 | |
1078 | 1079 | |
| 1080 | + |
| 1081 | + |
1079 | 1082 | |
1080 | 1083 | |
1081 | 1084 | |
| ||
1095 | 1098 | |
1096 | 1099 | |
1097 | 1100 | |
1098 | | - |
| 1101 | + |
1099 | 1102 | |
1100 | 1103 | |
1101 | 1104 | |
| ||
1113 | 1116 | |
1114 | 1117 | |
1115 | 1118 | |
| 1119 | + |
1116 | 1120 | |
1117 | 1121 | |
1118 | 1122 | |
| ||
1128 | 1132 | |
1129 | 1133 | |
1130 | 1134 | |
| 1135 | + |
1131 | 1136 | |
1132 | 1137 | |
1133 | 1138 | |
| ||
1165 | 1170 | |
1166 | 1171 | |
1167 | 1172 | |
| 1173 | + |
| 1174 | + |
1168 | 1175 | |
1169 | 1176 | |
1170 | 1177 | |
| ||
1175 | 1182 | |
1176 | 1183 | |
1177 | 1184 | |
1178 | | - |
| 1185 | + |
1179 | 1186 | |
1180 | 1187 | |
1181 | 1188 | |
| ||
1186 | 1193 | |
1187 | 1194 | |
1188 | 1195 | |
| 1196 | + |
1189 | 1197 | |
1190 | 1198 | |
1191 | 1199 | |
| ||
1209 | 1217 | |
1210 | 1218 | |
1211 | 1219 | |
| 1220 | + |
| 1221 | + |
1212 | 1222 | |
1213 | 1223 | |
1214 | 1224 | |
|
Collapse file
src/backend/executor/nodeSort.c
Copy file name to clipboardExpand all lines: src/backend/executor/nodeSort.c+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
137 | 137 | |
138 | 138 | |
139 | 139 | |
140 | | - |
| 140 | + |
141 | 141 | |
142 | 142 | |
143 | 143 | |
|
Collapse file
src/backend/utils/adt/orderedsetaggs.c
Copy file name to clipboardExpand all lines: src/backend/utils/adt/orderedsetaggs.c+23-10Lines changed: 23 additions & 10 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
453 | 453 | |
454 | 454 | |
455 | 455 | |
456 | | - |
| 456 | + |
457 | 457 | |
458 | 458 | |
459 | 459 | |
| ||
553 | 553 | |
554 | 554 | |
555 | 555 | |
556 | | - |
| 556 | + |
557 | 557 | |
558 | 558 | |
559 | 559 | |
| ||
564 | 564 | |
565 | 565 | |
566 | 566 | |
567 | | - |
| 567 | + |
568 | 568 | |
569 | 569 | |
570 | 570 | |
| ||
792 | 792 | |
793 | 793 | |
794 | 794 | |
795 | | - |
| 795 | + |
796 | 796 | |
797 | 797 | |
798 | 798 | |
| ||
921 | 921 | |
922 | 922 | |
923 | 923 | |
924 | | - |
| 924 | + |
| 925 | + |
925 | 926 | |
926 | 927 | |
927 | 928 | |
| ||
941 | 942 | |
942 | 943 | |
943 | 944 | |
944 | | - |
| 945 | + |
| 946 | + |
945 | 947 | |
946 | 948 | |
947 | 949 | |
| ||
1016 | 1018 | |
1017 | 1019 | |
1018 | 1020 | |
| 1021 | + |
| 1022 | + |
1019 | 1023 | |
1020 | 1024 | |
1021 | 1025 | |
| ||
1042 | 1046 | |
1043 | 1047 | |
1044 | 1048 | |
1045 | | - |
| 1049 | + |
1046 | 1050 | |
1047 | 1051 | |
1048 | 1052 | |
| ||
1054 | 1058 | |
1055 | 1059 | |
1056 | 1060 | |
| 1061 | + |
1057 | 1062 | |
1058 | | - |
| 1063 | + |
| 1064 | + |
1059 | 1065 | |
1060 | 1066 | |
1061 | 1067 | |
| ||
1078 | 1084 | |
1079 | 1085 | |
1080 | 1086 | |
| 1087 | + |
| 1088 | + |
1081 | 1089 | |
1082 | 1090 | |
1083 | 1091 | |
| ||
1181 | 1189 | |
1182 | 1190 | |
1183 | 1191 | |
1184 | | - |
| 1192 | + |
1185 | 1193 | |
1186 | 1194 | |
1187 | 1195 | |
| ||
1266 | 1274 | |
1267 | 1275 | |
1268 | 1276 | |
| 1277 | + |
| 1278 | + |
1269 | 1279 | |
1270 | 1280 | |
1271 | 1281 | |
| ||
1342 | 1352 | |
1343 | 1353 | |
1344 | 1354 | |
1345 | | - |
| 1355 | + |
1346 | 1356 | |
1347 | 1357 | |
1348 | 1358 | |
| ||
1353 | 1363 | |
1354 | 1364 | |
1355 | 1365 | |
| 1366 | + |
1356 | 1367 | |
1357 | 1368 | |
1358 | 1369 | |
| ||
1363 | 1374 | |
1364 | 1375 | |
1365 | 1376 | |
| 1377 | + |
| 1378 | + |
1366 | 1379 | |
1367 | 1380 | |
1368 | 1381 | |
|
Collapse file
src/backend/utils/sort/tuplesort.c
Copy file name to clipboardExpand all lines: src/backend/utils/sort/tuplesort.c+52-22Lines changed: 52 additions & 22 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1280 | 1280 | |
1281 | 1281 | |
1282 | 1282 | |
1283 | | - |
| 1283 | + |
| 1284 | + |
1284 | 1285 | |
1285 | 1286 | |
1286 | 1287 | |
| ||
1349 | 1350 | |
1350 | 1351 | |
1351 | 1352 | |
1352 | | - |
| 1353 | + |
| 1354 | + |
| 1355 | + |
| 1356 | + |
| 1357 | + |
1353 | 1358 | |
1354 | 1359 | |
1355 | 1360 | |
| ||
1866 | 1871 | |
1867 | 1872 | |
1868 | 1873 | |
| 1874 | + |
| 1875 | + |
| 1876 | + |
| 1877 | + |
| 1878 | + |
| 1879 | + |
| 1880 | + |
1869 | 1881 | |
1870 | 1882 | |
1871 | 1883 | |
1872 | | - |
| 1884 | + |
1873 | 1885 | |
1874 | 1886 | |
1875 | 1887 | |
| ||
1882 | 1894 | |
1883 | 1895 | |
1884 | 1896 | |
| 1897 | + |
| 1898 | + |
| 1899 | + |
| 1900 | + |
1885 | 1901 | |
1886 | 1902 | |
1887 | 1903 | |
| ||
1937 | 1953 | |
1938 | 1954 | |
1939 | 1955 | |
| 1956 | + |
| 1957 | + |
| 1958 | + |
| 1959 | + |
| 1960 | + |
| 1961 | + |
| 1962 | + |
1940 | 1963 | |
1941 | 1964 | |
1942 | 1965 | |
1943 | | - |
| 1966 | + |
1944 | 1967 | |
1945 | 1968 | |
1946 | 1969 | |
| ||
1952 | 1975 | |
1953 | 1976 | |
1954 | 1977 | |
| 1978 | + |
| 1979 | + |
| 1980 | + |
| 1981 | + |
1955 | 1982 | |
1956 | 1983 | |
1957 | 1984 | |
| ||
2232 | 2259 | |
2233 | 2260 | |
2234 | 2261 | |
2235 | | - |
2236 | | - |
2237 | | - |
2238 | | - |
2239 | | - |
2240 | | - |
2241 | | - |
2242 | | - |
2243 | | - |
2244 | | - |
2245 | | - |
2246 | | - |
2247 | | - |
2248 | | - |
2249 | | - |
2250 | 2262 | |
2251 | 2263 | |
2252 | 2264 | |
| ||
2263 | 2275 | |
2264 | 2276 | |
2265 | 2277 | |
| 2278 | + |
| 2279 | + |
| 2280 | + |
| 2281 | + |
| 2282 | + |
| 2283 | + |
| 2284 | + |
| 2285 | + |
| 2286 | + |
| 2287 | + |
| 2288 | + |
| 2289 | + |
| 2290 | + |
| 2291 | + |
| 2292 | + |
2266 | 2293 | |
2267 | 2294 | |
2268 | 2295 | |
| ||
3164 | 3191 | |
3165 | 3192 | |
3166 | 3193 | |
3167 | | - |
| 3194 | + |
| 3195 | + |
3168 | 3196 | |
3169 | 3197 | |
3170 | 3198 | |
| ||
3406 | 3434 | |
3407 | 3435 | |
3408 | 3436 | |
3409 | | - |
| 3437 | + |
| 3438 | + |
3410 | 3439 | |
3411 | 3440 | |
3412 | 3441 | |
| ||
3710 | 3739 | |
3711 | 3740 | |
3712 | 3741 | |
3713 | | - |
| 3742 | + |
| 3743 | + |
3714 | 3744 | |
3715 | 3745 | |
3716 | 3746 | |
|
0 commit comments