forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commite2f1eb0
committed
Implement partition-wise grouping/aggregation.
If the partition keys of input relation are part of the GROUP BYclause, all the rows belonging to a given group come from a singlepartition. This allows aggregation/grouping over a partitionedrelation to be broken down * into aggregation/grouping on eachpartition. This should be no worse, and often better, than the normalapproach.If the GROUP BY clause does not contain all the partition keys, we canstill perform partial aggregation for each partition and then finalizeaggregation after appending the partial results. This is less certainto be a win, but it's still useful.Jeevan Chalke, Ashutosh Bapat, Robert Haas. The larger patch seriesof which this patch is a part was also reviewed and tested by AntoninHouska, Rajkumar Raghuwanshi, David Rowley, Dilip Kumar, KonstantinKnizhnik, Pascal Legrand, and Rafia Sabih.Discussion:http://postgr.es/m/CAM2+6=V64_xhstVHie0Rz=KPEQnLJMZt_e314P0jaT_oJ9MR8A@mail.gmail.com1 parent2058d6a commite2f1eb0
File tree
17 files changed
+2544
-206
lines changed- doc/src/sgml
- src
- backend
- optimizer
- path
- plan
- utils/misc
- include
- nodes
- optimizer
- test/regress
- expected
- sql
- tools/pgindent
17 files changed
+2544
-206
lines changedLines changed: 20 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3821 | 3821 |
| |
3822 | 3822 |
| |
3823 | 3823 |
| |
| 3824 | + | |
| 3825 | + | |
| 3826 | + | |
| 3827 | + | |
| 3828 | + | |
| 3829 | + | |
| 3830 | + | |
| 3831 | + | |
| 3832 | + | |
| 3833 | + | |
| 3834 | + | |
| 3835 | + | |
| 3836 | + | |
| 3837 | + | |
| 3838 | + | |
| 3839 | + | |
| 3840 | + | |
| 3841 | + | |
| 3842 | + | |
| 3843 | + | |
3824 | 3844 |
| |
3825 | 3845 |
| |
3826 | 3846 |
| |
|
Lines changed: 14 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1079 | 1079 |
| |
1080 | 1080 |
| |
1081 | 1081 |
| |
| 1082 | + | |
1082 | 1083 |
| |
1083 | 1084 |
| |
1084 | 1085 |
| |
| |||
1102 | 1103 |
| |
1103 | 1104 |
| |
1104 | 1105 |
| |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + |
Lines changed: 13 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
134 | 134 |
| |
135 | 135 |
| |
136 | 136 |
| |
137 |
| - | |
138 |
| - | |
139 | 137 |
| |
140 | 138 |
| |
141 | 139 |
| |
| |||
1326 | 1324 |
| |
1327 | 1325 |
| |
1328 | 1326 |
| |
1329 |
| - | |
| 1327 | + | |
1330 | 1328 |
| |
1331 | 1329 |
| |
1332 | 1330 |
| |
| |||
1413 | 1411 |
| |
1414 | 1412 |
| |
1415 | 1413 |
| |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
1416 | 1417 |
| |
1417 |
| - | |
| 1418 | + | |
| 1419 | + | |
1418 | 1420 |
| |
1419 | 1421 |
| |
1420 | 1422 |
| |
| |||
1682 | 1684 |
| |
1683 | 1685 |
| |
1684 | 1686 |
| |
| 1687 | + | |
| 1688 | + | |
| 1689 | + | |
| 1690 | + | |
| 1691 | + | |
| 1692 | + | |
| 1693 | + | |
1685 | 1694 |
| |
1686 | 1695 |
| |
1687 | 1696 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
135 | 135 |
| |
136 | 136 |
| |
137 | 137 |
| |
| 138 | + | |
138 | 139 |
| |
139 | 140 |
| |
140 | 141 |
| |
|
Lines changed: 9 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1670 | 1670 |
| |
1671 | 1671 |
| |
1672 | 1672 |
| |
1673 |
| - | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
| 1680 | + | |
| 1681 | + | |
1674 | 1682 |
| |
1675 | 1683 |
| |
1676 | 1684 |
| |
|
0 commit comments
Comments
(0)