forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit355d399
committed
Add a Gather Merge executor node.
Like Gather, we spawn multiple workers and run the same plan in eachone; however, Gather Merge is used when each worker produces the sameoutput ordering and we want to preserve that output ordering whilemerging together the streams of tuples from various workers. (In away, Gather Merge is like a hybrid of Gather and MergeAppend.)This works out to a win if it saves us from having to perform anexpensive Sort. In cases where only a small amount of data would needto be sorted, it may actually be faster to use a regular Gather nodeand then sort the results afterward, because Gather Merge sometimesneeds to wait synchronously for tuples whereas a pure Gather generallydoesn't. But if this avoids an expensive sort then it's a win.Rushabh Lathia, reviewed and tested by Amit Kapila, Thomas Munro,and Neha Sharma, and reviewed and revised by me.Discussion:http://postgr.es/m/CAGPqQf09oPX-cQRpBKS0Gq49Z+m6KBxgxd_p9gX8CKk_d75HoQ@mail.gmail.com1 parenta72f036 commit355d399
File tree
27 files changed
+1355
-16
lines changed- doc/src/sgml
- src
- backend
- commands
- executor
- nodes
- optimizer
- path
- plan
- util
- utils/misc
- include
- executor
- nodes
- optimizer
- test/regress
- expected
- sql
- tools/pgindent
27 files changed
+1355
-16
lines changedLines changed: 14 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3497 | 3497 |
| |
3498 | 3498 |
| |
3499 | 3499 |
| |
| 3500 | + | |
| 3501 | + | |
| 3502 | + | |
| 3503 | + | |
| 3504 | + | |
| 3505 | + | |
| 3506 | + | |
| 3507 | + | |
| 3508 | + | |
| 3509 | + | |
| 3510 | + | |
| 3511 | + | |
| 3512 | + | |
| 3513 | + | |
3500 | 3514 |
| |
3501 | 3515 |
| |
3502 | 3516 |
| |
|
Lines changed: 23 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
918 | 918 |
| |
919 | 919 |
| |
920 | 920 |
| |
| 921 | + | |
| 922 | + | |
| 923 | + | |
921 | 924 |
| |
922 | 925 |
| |
923 | 926 |
| |
| |||
1411 | 1414 |
| |
1412 | 1415 |
| |
1413 | 1416 |
| |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
| 1436 | + | |
1414 | 1437 |
| |
1415 | 1438 |
| |
1416 | 1439 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
20 | 20 |
| |
21 | 21 |
| |
22 | 22 |
| |
23 |
| - | |
| 23 | + | |
24 | 24 |
| |
25 | 25 |
| |
26 | 26 |
| |
|
Lines changed: 17 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
89 | 89 |
| |
90 | 90 |
| |
91 | 91 |
| |
| 92 | + | |
92 | 93 |
| |
93 | 94 |
| |
94 | 95 |
| |
| |||
326 | 327 |
| |
327 | 328 |
| |
328 | 329 |
| |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
329 | 335 |
| |
330 | 336 |
| |
331 | 337 |
| |
| |||
535 | 541 |
| |
536 | 542 |
| |
537 | 543 |
| |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
538 | 548 |
| |
539 | 549 |
| |
540 | 550 |
| |
| |||
697 | 707 |
| |
698 | 708 |
| |
699 | 709 |
| |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
700 | 714 |
| |
701 | 715 |
| |
702 | 716 |
| |
| |||
842 | 856 |
| |
843 | 857 |
| |
844 | 858 |
| |
| 859 | + | |
| 860 | + | |
| 861 | + | |
845 | 862 |
| |
846 | 863 |
| |
847 | 864 |
| |
|
0 commit comments
Comments
(0)