Commit e09d7a1
committed
Improve speed of hash index build.
In the initial data sort, if the bucket numbers are the same then
next sort on the hash value. Because index pages are kept in
hash value order, this gains a little speed by allowing the
eventual tuple insertions to be done sequentially, avoiding repeated
data movement within PageAddItem. This seems to be good for overall
speedup of 5%-9%, depending on the incoming data.
Simon Riggs, reviewed by Amit Kapila
Discussion: https://postgr.es/m/CANbhV-FG-1ZNMBuwhUF7AxxJz3u5137dYL-o6hchK1V_dMw86g@mail.gmail.com1 parent 70a437a commit e09d7a1
File tree
2 files changed
+21
-5
lines changed- src/backend
- access/hash
- utils/sort
2 files changed
+21
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | | - | |
47 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1387 | 1387 | | |
1388 | 1388 | | |
1389 | 1389 | | |
| 1390 | + | |
| 1391 | + | |
1390 | 1392 | | |
1391 | 1393 | | |
1392 | 1394 | | |
1393 | 1395 | | |
1394 | 1396 | | |
1395 | 1397 | | |
1396 | | - | |
1397 | | - | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
1398 | 1401 | | |
1399 | 1402 | | |
1400 | 1403 | | |
| |||
1409 | 1412 | | |
1410 | 1413 | | |
1411 | 1414 | | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
1412 | 1427 | | |
1413 | 1428 | | |
1414 | 1429 | | |
| |||
0 commit comments