forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit4adc2f7
committed
Change hash indexes to store only the hash code rather than the whole indexed
value. This means that hash index lookups are always lossy and have to berechecked when the heap is visited; however, the gain in index compactnessoutweighs this when the indexed values are wide. Also, we only need toperform datatype comparisons when the hash codes match exactly, rather thanfor every entry in the hash bucket; so it could also win for datatypes thathave expensive comparison functions. A small additional win is gained bykeeping hash index pages sorted by hash code and using binary search to reducethe number of index tuples we have to look at.Xiao MengThis commit also incorporates Zdenek Kotala's patch to isolate hash metapagesand hash bitmaps a bit better from the page header datastructures.1 parent440b338 commit4adc2f7
File tree
13 files changed
+313
-129
lines changed- doc/src/sgml
- src
- backend
- access/hash
- catalog
- utils/sort
- include
- access
- catalog
13 files changed
+313
-129
lines changedLines changed: 9 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 |
| - | |
| 1 | + | |
2 | 2 |
| |
3 | 3 |
| |
4 | 4 |
| |
| |||
451 | 451 |
| |
452 | 452 |
| |
453 | 453 |
| |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
454 | 461 |
| |
455 | 462 |
| |
456 | 463 |
| |
| |||
6424 | 6431 |
| |
6425 | 6432 |
| |
6426 | 6433 |
| |
6427 |
| - | |
| 6434 | + | |
6428 | 6435 |
| |
6429 | 6436 |
| |
6430 | 6437 |
| |
|
Lines changed: 13 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
79 | 79 |
| |
80 | 80 |
| |
81 | 81 |
| |
82 |
| - | |
| 82 | + | |
83 | 83 |
| |
84 | 84 |
| |
85 | 85 |
| |
86 | 86 |
| |
87 |
| - | |
| 87 | + | |
88 | 88 |
| |
89 | 89 |
| |
90 | 90 |
| |
| |||
129 | 129 |
| |
130 | 130 |
| |
131 | 131 |
| |
132 |
| - | |
| 132 | + | |
133 | 133 |
| |
134 | 134 |
| |
135 | 135 |
| |
| |||
153 | 153 |
| |
154 | 154 |
| |
155 | 155 |
| |
156 |
| - | |
157 |
| - | |
| 156 | + | |
| 157 | + | |
158 | 158 |
| |
159 | 159 |
| |
160 | 160 |
| |
| |||
171 | 171 |
| |
172 | 172 |
| |
173 | 173 |
| |
174 |
| - | |
| 174 | + | |
175 | 175 |
| |
176 | 176 |
| |
177 | 177 |
| |
| |||
211 | 211 |
| |
212 | 212 |
| |
213 | 213 |
| |
214 |
| - | |
215 |
| - | |
| 214 | + | |
| 215 | + | |
216 | 216 |
| |
217 | 217 |
| |
218 | 218 |
| |
| |||
317 | 317 |
| |
318 | 318 |
| |
319 | 319 |
| |
320 |
| - | |
| 320 | + | |
| 321 | + | |
321 | 322 |
| |
322 | 323 |
| |
323 | 324 |
| |
| |||
527 | 528 |
| |
528 | 529 |
| |
529 | 530 |
| |
530 |
| - | |
| 531 | + | |
531 | 532 |
| |
532 | 533 |
| |
533 | 534 |
| |
| |||
629 | 630 |
| |
630 | 631 |
| |
631 | 632 |
| |
632 |
| - | |
| 633 | + | |
633 | 634 |
| |
634 | 635 |
| |
635 | 636 |
| |
|
Lines changed: 11 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
43 | 43 |
| |
44 | 44 |
| |
45 | 45 |
| |
46 |
| - | |
47 |
| - | |
48 | 46 |
| |
49 | 47 |
| |
50 |
| - | |
51 |
| - | |
| 48 | + | |
52 | 49 |
| |
53 |
| - | |
54 |
| - | |
55 |
| - | |
56 |
| - | |
57 |
| - | |
| 50 | + | |
58 | 51 |
| |
59 | 52 |
| |
60 | 53 |
| |
| |||
69 | 62 |
| |
70 | 63 |
| |
71 | 64 |
| |
72 |
| - | |
| 65 | + | |
73 | 66 |
| |
74 | 67 |
| |
75 | 68 |
| |
76 | 69 |
| |
77 | 70 |
| |
| 71 | + | |
| 72 | + | |
78 | 73 |
| |
79 | 74 |
| |
80 | 75 |
| |
| |||
197 | 192 |
| |
198 | 193 |
| |
199 | 194 |
| |
| 195 | + | |
200 | 196 |
| |
201 | 197 |
| |
202 | 198 |
| |
203 | 199 |
| |
204 |
| - | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
205 | 204 |
| |
206 | 205 |
| |
207 | 206 |
| |
|
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
187 | 187 |
| |
188 | 188 |
| |
189 | 189 |
| |
190 |
| - | |
| 190 | + | |
191 | 191 |
| |
192 | 192 |
| |
193 | 193 |
| |
| |||
450 | 450 |
| |
451 | 451 |
| |
452 | 452 |
| |
453 |
| - | |
| 453 | + | |
454 | 454 |
| |
455 | 455 |
| |
456 | 456 |
| |
|
Lines changed: 10 additions & 22 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
348 | 348 |
| |
349 | 349 |
| |
350 | 350 |
| |
351 |
| - | |
352 |
| - | |
| 351 | + | |
353 | 352 |
| |
354 |
| - | |
355 |
| - | |
| 353 | + | |
356 | 354 |
| |
357 | 355 |
| |
358 | 356 |
| |
| |||
395 | 393 |
| |
396 | 394 |
| |
397 | 395 |
| |
398 |
| - | |
| 396 | + | |
399 | 397 |
| |
400 | 398 |
| |
401 | 399 |
| |
402 | 400 |
| |
403 | 401 |
| |
404 | 402 |
| |
405 |
| - | |
| 403 | + | |
406 | 404 |
| |
407 | 405 |
| |
408 | 406 |
| |
409 |
| - | |
410 |
| - | |
411 |
| - | |
| 407 | + | |
412 | 408 |
| |
413 | 409 |
| |
414 | 410 |
| |
| |||
532 | 528 |
| |
533 | 529 |
| |
534 | 530 |
| |
535 |
| - | |
| 531 | + | |
536 | 532 |
| |
537 | 533 |
| |
538 | 534 |
| |
| |||
774 | 770 |
| |
775 | 771 |
| |
776 | 772 |
| |
777 |
| - | |
778 |
| - | |
779 | 773 |
| |
780 | 774 |
| |
781 | 775 |
| |
| |||
785 | 779 |
| |
786 | 780 |
| |
787 | 781 |
| |
788 |
| - | |
789 | 782 |
| |
790 | 783 |
| |
791 | 784 |
| |
| |||
846 | 839 |
| |
847 | 840 |
| |
848 | 841 |
| |
849 |
| - | |
850 |
| - | |
851 |
| - | |
852 |
| - | |
| 842 | + | |
| 843 | + | |
853 | 844 |
| |
854 | 845 |
| |
855 |
| - | |
856 |
| - | |
857 |
| - | |
858 |
| - | |
| 846 | + | |
859 | 847 |
| |
860 | 848 |
| |
861 | 849 |
| |
|
0 commit comments
Comments
(0)