- Notifications
You must be signed in to change notification settings - Fork28
Commit8db05ba
committed
Repair old performance bug in tuplesort.c/logtape.c. In the case where
we are doing the final merge pass on-the-fly, and not writing the databack onto a 'tape', the number of free blocks in the tape set will becomelarge, leading to a lot of time wasted in ltsReleaseBlock(). There isreally no need to track the free blocks anymore in this state, so add asimple shutoff switch. Per report from Stefan Kaltenbrunner.1 parente6107da commit8db05ba
File tree
3 files changed
+65
-17
lines changed- src
- backend/utils/sort
- include/utils
3 files changed
+65
-17
lines changedLines changed: 28 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
64 | 64 |
| |
65 | 65 |
| |
66 | 66 |
| |
67 |
| - | |
| 67 | + | |
68 | 68 |
| |
69 | 69 |
| |
70 | 70 |
| |
| |||
146 | 146 |
| |
147 | 147 |
| |
148 | 148 |
| |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
149 | 153 |
| |
| 154 | + | |
150 | 155 |
| |
151 | 156 |
| |
152 | 157 |
| |
| |||
247 | 252 |
| |
248 | 253 |
| |
249 | 254 |
| |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
250 | 261 |
| |
251 | 262 |
| |
252 | 263 |
| |
| |||
491 | 502 |
| |
492 | 503 |
| |
493 | 504 |
| |
| 505 | + | |
494 | 506 |
| |
495 | 507 |
| |
496 | 508 |
| |
| |||
546 | 558 |
| |
547 | 559 |
| |
548 | 560 |
| |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
549 | 576 |
| |
550 | 577 |
| |
551 | 578 |
| |
|
Lines changed: 35 additions & 15 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
91 | 91 |
| |
92 | 92 |
| |
93 | 93 |
| |
94 |
| - | |
| 94 | + | |
95 | 95 |
| |
96 | 96 |
| |
97 | 97 |
| |
| |||
1384 | 1384 |
| |
1385 | 1385 |
| |
1386 | 1386 |
| |
1387 |
| - | |
| 1387 | + | |
| 1388 | + | |
1388 | 1389 |
| |
1389 | 1390 |
| |
1390 | 1391 |
| |
| |||
1401 | 1402 |
| |
1402 | 1403 |
| |
1403 | 1404 |
| |
1404 |
| - | |
1405 |
| - | |
1406 |
| - | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
1407 | 1412 |
| |
1408 |
| - | |
1409 | 1413 |
| |
1410 | 1414 |
| |
| 1415 | + | |
1411 | 1416 |
| |
1412 | 1417 |
| |
1413 |
| - | |
1414 |
| - | |
1415 | 1418 |
| |
| 1419 | + | |
1416 | 1420 |
| |
| 1421 | + | |
| 1422 | + | |
1417 | 1423 |
| |
1418 |
| - | |
1419 |
| - | |
1420 |
| - | |
1421 |
| - | |
1422 |
| - | |
1423 |
| - | |
| 1424 | + | |
1424 | 1425 |
| |
1425 |
| - | |
| 1426 | + | |
| 1427 | + | |
1426 | 1428 |
| |
1427 | 1429 |
| |
1428 | 1430 |
| |
1429 | 1431 |
| |
1430 | 1432 |
| |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
| 1436 | + | |
| 1437 | + | |
| 1438 | + | |
| 1439 | + | |
| 1440 | + | |
| 1441 | + | |
| 1442 | + | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
1431 | 1450 |
| |
1432 | 1451 |
| |
1433 | 1452 |
| |
| |||
1437 | 1456 |
| |
1438 | 1457 |
| |
1439 | 1458 |
| |
| 1459 | + | |
1440 | 1460 |
| |
1441 | 1461 |
| |
1442 | 1462 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
26 | 26 |
| |
27 | 27 |
| |
28 | 28 |
| |
| 29 | + | |
29 | 30 |
| |
30 | 31 |
| |
31 | 32 |
| |
|
0 commit comments
Comments
(0)