forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit16fa9b2
committed
Add support for building GiST index by sorting.
This adds a new optional support function to the GiST access method:sortsupport. If it is defined, the GiST index is built by sorting all datato the order defined by the sortsupport's comparator function, and packingthe tuples in that order to GiST pages. This is similar to how B-treeindex build works, and is much faster than inserting the tuples one byone. The resulting index is smaller too, because the pages are packed moretightly, upto 'fillfactor'. The normal build method works by splittingpages, which tends to lead to more wasted space.The quality of the resulting index depends on how good the opclass-definedsort order is. A good order preserves locality of the input data.As the first user of this facility, add 'sortsupport' function to thepoint_ops opclass. It sorts the points in Z-order (aka Morton Code), byinterleaving the bits of the X and Y coordinates.Author: Andrey BorodinReviewed-by: Pavel Borisov, Thomas MunroDiscussion:https://www.postgresql.org/message-id/1A36620E-CAD8-4267-9067-FB31385E7C0D%40yandex-team.ru1 parent089da3c commit16fa9b2
File tree
17 files changed
+935
-106
lines changed- doc/src/sgml
- src
- backend
- access
- gist
- transam
- utils/sort
- include
- access
- catalog
- utils
- test/regress/expected
17 files changed
+935
-106
lines changedLines changed: 70 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
259 | 259 |
| |
260 | 260 |
| |
261 | 261 |
| |
| 262 | + | |
| 263 | + | |
262 | 264 |
| |
263 | 265 |
| |
264 | 266 |
| |
| |||
1065 | 1067 |
| |
1066 | 1068 |
| |
1067 | 1069 |
| |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
1068 | 1138 |
| |
1069 | 1139 |
| |
1070 | 1140 |
| |
|
0 commit comments
Comments
(0)