- Notifications
You must be signed in to change notification settings - Fork5
Commit472d393
committed
Rethink representation of index clauses' mapping to index columns.
In commite2c2c2e I made use of nestedlist structures to show which clauses went with which index columns, buton reflection that's a data structure that only an old-line Lisp hackercould love. Worse, it adds unnecessary complication to the many placesthat don't much care which clauses go with which index columns. Revertto the previous arrangement of flat lists of clauses, and instead add aparallel integer list of column numbers. The places that care about thepairing can chase both lists with forboth(), while the places that don'tcare just examine one list the same as before.The only real downside to this is that there are now two more lists thatneed to be passed to amcostestimate functions in case they care aboutcolumn matching (which btcostestimate does, so not passing the info is notan option). Rather than deal with 11-argument amcostestimate functions,pass just the IndexPath and expect the functions to extract fields from it.That gets us down to 7 arguments which is better than 11, and it seemsmore future-proof against likely additions to the information we keepabout an index path.1 parente2c2c2e commit472d393
File tree
16 files changed
+543
-686
lines changed- doc/src/sgml
- src
- backend
- access/nbtree
- nodes
- optimizer
- path
- plan
- util
- utils/adt
- include
- catalog
- nodes
- optimizer
16 files changed
+543
-686
lines changedLines changed: 14 additions & 37 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
288 | 288 |
| |
289 | 289 |
| |
290 | 290 |
| |
291 |
| - | |
292 |
| - | |
293 |
| - | |
| 291 | + | |
294 | 292 |
| |
295 | 293 |
| |
296 | 294 |
| |
| |||
929 | 927 |
| |
930 | 928 |
| |
931 | 929 |
| |
932 |
| - | |
933 |
| - | |
934 |
| - | |
| 930 | + | |
935 | 931 |
| |
936 | 932 |
| |
937 | 933 |
| |
938 | 934 |
| |
939 | 935 |
| |
940 | 936 |
| |
941 | 937 |
| |
942 |
| - | |
| 938 | + | |
943 | 939 |
| |
944 | 940 |
| |
945 | 941 |
| |
| |||
952 | 948 |
| |
953 | 949 |
| |
954 | 950 |
| |
955 |
| - | |
| 951 | + | |
956 | 952 |
| |
957 | 953 |
| |
958 |
| - | |
959 |
| - | |
960 |
| - | |
961 |
| - | |
962 |
| - | |
963 |
| - | |
964 |
| - | |
965 |
| - | |
966 |
| - | |
967 |
| - | |
968 |
| - | |
969 |
| - | |
970 |
| - | |
971 |
| - | |
972 |
| - | |
973 |
| - | |
974 |
| - | |
975 |
| - | |
976 |
| - | |
977 |
| - | |
978 |
| - | |
979 |
| - | |
980 |
| - | |
| 954 | + | |
| 955 | + | |
981 | 956 |
| |
982 | 957 |
| |
983 | 958 |
| |
| |||
988 | 963 |
| |
989 | 964 |
| |
990 | 965 |
| |
991 |
| - | |
| 966 | + | |
| 967 | + | |
992 | 968 |
| |
993 | 969 |
| |
994 | 970 |
| |
| |||
1055 | 1031 |
| |
1056 | 1032 |
| |
1057 | 1033 |
| |
1058 |
| - | |
| 1034 | + | |
1059 | 1035 |
| |
1060 | 1036 |
| |
1061 | 1037 |
| |
| |||
1103 | 1079 |
| |
1104 | 1080 |
| |
1105 | 1081 |
| |
1106 |
| - | |
1107 |
| - | |
| 1082 | + | |
| 1083 | + | |
1108 | 1084 |
| |
1109 | 1085 |
| |
1110 | 1086 |
| |
| |||
1115 | 1091 |
| |
1116 | 1092 |
| |
1117 | 1093 |
| |
1118 |
| - | |
| 1094 | + | |
| 1095 | + | |
1119 | 1096 |
| |
1120 | 1097 |
| |
1121 | 1098 |
| |
| |||
1137 | 1114 |
| |
1138 | 1115 |
| |
1139 | 1116 |
| |
1140 |
| - | |
| 1117 | + | |
1141 | 1118 |
| |
1142 | 1119 |
| |
1143 | 1120 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
616 | 616 |
| |
617 | 617 |
| |
618 | 618 |
| |
619 |
| - | |
| 619 | + | |
620 | 620 |
| |
621 | 621 |
| |
622 | 622 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1512 | 1512 |
| |
1513 | 1513 |
| |
1514 | 1514 |
| |
| 1515 | + | |
1515 | 1516 |
| |
| 1517 | + | |
1516 | 1518 |
| |
1517 | 1519 |
| |
1518 | 1520 |
| |
|
Lines changed: 20 additions & 30 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
52 | 52 |
| |
53 | 53 |
| |
54 | 54 |
| |
55 |
| - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
56 | 58 |
| |
57 | 59 |
| |
58 | 60 |
| |
| |||
208 | 210 |
| |
209 | 211 |
| |
210 | 212 |
| |
211 |
| - | |
212 |
| - | |
213 |
| - | |
214 |
| - | |
215 |
| - | |
216 |
| - | |
| 213 | + | |
| 214 | + | |
217 | 215 |
| |
218 |
| - | |
| 216 | + | |
219 | 217 |
| |
220 | 218 |
| |
221 | 219 |
| |
222 |
| - | |
223 |
| - | |
224 |
| - | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
225 | 223 |
| |
226 |
| - | |
227 |
| - | |
228 |
| - | |
229 |
| - | |
230 |
| - | |
231 |
| - | |
232 |
| - | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
233 | 228 |
| |
234 | 229 |
| |
235 |
| - | |
236 |
| - | |
237 |
| - | |
238 |
| - | |
239 |
| - | |
240 |
| - | |
| 230 | + | |
241 | 231 |
| |
| 232 | + | |
242 | 233 |
| |
| 234 | + | |
243 | 235 |
| |
244 | 236 |
| |
245 | 237 |
| |
| |||
271 | 263 |
| |
272 | 264 |
| |
273 | 265 |
| |
274 |
| - | |
| 266 | + | |
275 | 267 |
| |
276 |
| - | |
277 |
| - | |
278 |
| - | |
| 268 | + | |
279 | 269 |
| |
280 | 270 |
| |
281 | 271 |
| |
| |||
431 | 421 |
| |
432 | 422 |
| |
433 | 423 |
| |
434 |
| - | |
| 424 | + | |
435 | 425 |
| |
436 | 426 |
| |
437 | 427 |
| |
| |||
589 | 579 |
| |
590 | 580 |
| |
591 | 581 |
| |
592 |
| - | |
| 582 | + | |
593 | 583 |
| |
594 | 584 |
| |
595 | 585 |
| |
|
0 commit comments
Comments
(0)