- Notifications
You must be signed in to change notification settings - Fork28
Commit45be99f
committed
Support parallel joins, and make related improvements.
The core innovation of this patch is the introduction of the conceptof a partial path; that is, a path which if executed in parallel willgenerate a subset of the output rows in each process. Gathering apartial path produces an ordinary (complete) path. This allows us togenerate paths for parallel joins by joining a partial path for oneside (which at the baserel level is currently always a Partial SeqScan) to an ordinary path on the other side. This is subject tovarious restrictions at present, especially that this strategy seemsunlikely to be sensible for merge joins, so only nested loops andhash joins paths are generated.This also allows an Append node to be pushed below a Gather node inthe case of a partitioned table.Testing revealed that early versions of this patch made poor decisionsin some cases, which turned out to be caused by the fact that theoriginal cost model for Parallel Seq Scan wasn't very good. So thispatch tries to make some modest improvements in that area.There is much more to be done in the area of generating good parallelplans in all cases, but this seems like a useful step forward.Patch by me, reviewed by Dilip Kumar and Amit Kapila.1 parenta7de3dc commit45be99f
File tree
15 files changed
+875
-119
lines changed- src
- backend
- executor
- nodes
- optimizer
- path
- plan
- util
- include
- nodes
- optimizer
15 files changed
+875
-119
lines changedLines changed: 40 additions & 26 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
167 | 167 |
| |
168 | 168 |
| |
169 | 169 |
| |
170 |
| - | |
| 170 | + | |
171 | 171 |
| |
172 |
| - | |
173 |
| - | |
174 |
| - | |
175 |
| - | |
176 |
| - | |
177 |
| - | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
178 | 181 |
| |
179 | 182 |
| |
180 | 183 |
| |
181 | 184 |
| |
182 | 185 |
| |
183 | 186 |
| |
184 |
| - | |
185 |
| - | |
186 |
| - | |
187 |
| - | |
188 |
| - | |
| 187 | + | |
| 188 | + | |
189 | 189 |
| |
190 | 190 |
| |
191 | 191 |
| |
| |||
202 | 202 |
| |
203 | 203 |
| |
204 | 204 |
| |
205 |
| - | |
206 |
| - | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
207 | 215 |
| |
208 |
| - | |
209 |
| - | |
210 |
| - | |
211 |
| - | |
212 |
| - | |
213 |
| - | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
214 | 225 |
| |
215 | 226 |
| |
216 | 227 |
| |
| |||
623 | 634 |
| |
624 | 635 |
| |
625 | 636 |
| |
626 |
| - | |
| 637 | + | |
627 | 638 |
| |
628 |
| - | |
629 |
| - | |
630 |
| - | |
631 |
| - | |
632 |
| - | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
633 | 647 |
| |
634 | 648 |
| |
635 | 649 |
| |
|
Lines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1591 | 1591 |
| |
1592 | 1592 |
| |
1593 | 1593 |
| |
| 1594 | + | |
| 1595 | + | |
1594 | 1596 |
| |
1595 | 1597 |
| |
1596 | 1598 |
| |
| |||
1768 | 1770 |
| |
1769 | 1771 |
| |
1770 | 1772 |
| |
1771 |
| - | |
1772 | 1773 |
| |
1773 | 1774 |
| |
1774 | 1775 |
| |
| |||
1890 | 1891 |
| |
1891 | 1892 |
| |
1892 | 1893 |
| |
| 1894 | + | |
1893 | 1895 |
| |
1894 | 1896 |
| |
1895 | 1897 |
| |
|
Lines changed: 54 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
851 | 851 |
| |
852 | 852 |
| |
853 | 853 |
| |
854 |
| - | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + |
0 commit comments
Comments
(0)