forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitc9a1cc6
committed
Change hash index creation so that rather than always establishing exactly
two buckets at the start, we create a number of buckets appropriate for theestimated size of the table. This avoids a lot of expensive bucket-splitactions during initial index build on an already-populated table.This is one of the two core ideas of Tom Raney and Shreya Bhargava's patchto reduce hash index build time. I'm committing it separately to make iteasier for people to test the effects of this separately from the effectsof their other core idea (pre-sorting the index entries by bucket number).1 parent4873c96 commitc9a1cc6
6 files changed
+70
-29
lines changedLines changed: 9 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 |
| - | |
| 1 | + | |
2 | 2 |
| |
3 | 3 |
| |
4 | 4 |
| |
| |||
65 | 65 |
| |
66 | 66 |
| |
67 | 67 |
| |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
68 | 73 |
| |
69 | 74 |
| |
70 | 75 |
| |
| |||
101 | 106 |
| |
102 | 107 |
| |
103 | 108 |
| |
104 |
| - | |
105 |
| - | |
106 |
| - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
107 | 112 |
| |
108 | 113 |
| |
109 | 114 |
| |
|
Lines changed: 8 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 |
| |
| |||
22 | 22 |
| |
23 | 23 |
| |
24 | 24 |
| |
| 25 | + | |
25 | 26 |
| |
26 | 27 |
| |
27 | 28 |
| |
| |||
48 | 49 |
| |
49 | 50 |
| |
50 | 51 |
| |
| 52 | + | |
51 | 53 |
| |
52 | 54 |
| |
53 | 55 |
| |
| |||
59 | 61 |
| |
60 | 62 |
| |
61 | 63 |
| |
62 |
| - | |
63 |
| - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
64 | 69 |
| |
65 | 70 |
| |
66 | 71 |
| |
|
Lines changed: 44 additions & 15 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 |
| |
| |||
312 | 312 |
| |
313 | 313 |
| |
314 | 314 |
| |
315 |
| - | |
316 |
| - | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
317 | 319 |
| |
318 | 320 |
| |
319 | 321 |
| |
320 | 322 |
| |
321 | 323 |
| |
322 | 324 |
| |
323 |
| - | |
| 325 | + | |
324 | 326 |
| |
325 | 327 |
| |
326 | 328 |
| |
| |||
330 | 332 |
| |
331 | 333 |
| |
332 | 334 |
| |
333 |
| - | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
334 | 339 |
| |
335 | 340 |
| |
336 | 341 |
| |
| |||
354 | 359 |
| |
355 | 360 |
| |
356 | 361 |
| |
357 |
| - | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
358 | 382 |
| |
359 | 383 |
| |
360 | 384 |
| |
| |||
398 | 422 |
| |
399 | 423 |
| |
400 | 424 |
| |
401 |
| - | |
402 |
| - | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
403 | 428 |
| |
404 |
| - | |
405 |
| - | |
| 429 | + | |
| 430 | + | |
406 | 431 |
| |
407 | 432 |
| |
408 | 433 |
| |
409 | 434 |
| |
410 |
| - | |
411 |
| - | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
412 | 438 |
| |
413 | 439 |
| |
414 | 440 |
| |
415 |
| - | |
| 441 | + | |
416 | 442 |
| |
417 |
| - | |
| 443 | + | |
418 | 444 |
| |
419 | 445 |
| |
420 | 446 |
| |
| |||
430 | 456 |
| |
431 | 457 |
| |
432 | 458 |
| |
433 |
| - | |
| 459 | + | |
434 | 460 |
| |
435 | 461 |
| |
436 | 462 |
| |
| |||
511 | 537 |
| |
512 | 538 |
| |
513 | 539 |
| |
| 540 | + | |
| 541 | + | |
| 542 | + | |
514 | 543 |
| |
515 | 544 |
| |
516 | 545 |
| |
|
Lines changed: 2 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
12 |
| - | |
| 12 | + | |
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
| |||
45 | 45 |
| |
46 | 46 |
| |
47 | 47 |
| |
48 |
| - | |
49 |
| - | |
50 | 48 |
| |
51 | 49 |
| |
52 | 50 |
| |
| |||
319 | 317 |
| |
320 | 318 |
| |
321 | 319 |
| |
322 |
| - | |
| 320 | + | |
323 | 321 |
| |
324 | 322 |
| |
325 | 323 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
298 | 298 |
| |
299 | 299 |
| |
300 | 300 |
| |
301 |
| - | |
| 301 | + | |
302 | 302 |
| |
303 | 303 |
| |
304 | 304 |
| |
|
Lines changed: 5 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
| 18 | + | |
18 | 19 |
| |
19 | 20 |
| |
20 | 21 |
| |
| |||
27 | 28 |
| |
28 | 29 |
| |
29 | 30 |
| |
| 31 | + | |
| 32 | + | |
| 33 | + | |
30 | 34 |
| |
31 | 35 |
| |
32 | 36 |
| |
|
0 commit comments
Comments
(0)