diff options
author | Robert Haas <rhaas@postgresql.org> | 2018-03-22 12:49:48 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2018-03-22 12:49:48 -0400 |
commit | e2f1eb0ee30d144628ab523432320f174a2c8966 (patch) | |
tree | c966ef6a6de9c5e3e4a8c6a0b310cb61306535f5 /doc/src | |
parent | 2058d6a22b43a97d1069a51bd95ad56759b3c7bc (diff) |
Implement partition-wise grouping/aggregation.
If the partition keys of input relation are part of the GROUP BY
clause, all the rows belonging to a given group come from a single
partition. This allows aggregation/grouping over a partitioned
relation to be broken down * into aggregation/grouping on each
partition. This should be no worse, and often better, than the normal
approach.
If the GROUP BY clause does not contain all the partition keys, we can
still perform partial aggregation for each partition and then finalize
aggregation after appending the partial results. This is less certain
to be a win, but it's still useful.
Jeevan Chalke, Ashutosh Bapat, Robert Haas. The larger patch series
of which this patch is a part was also reviewed and tested by Antonin
Houska, Rajkumar Raghuwanshi, David Rowley, Dilip Kumar, Konstantin
Knizhnik, Pascal Legrand, and Rafia Sabih.
Discussion: http://postgr.es/m/CAM2+6=V64_xhstVHie0Rz=KPEQnLJMZt_e314P0jaT_oJ9MR8A@mail.gmail.com
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/config.sgml | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 0d61dcb1798..4d899e3b244 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -3821,6 +3821,26 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" </listitem> </varlistentry> + <varlistentry id="guc-enable-partitionwise-aggregate" xreflabel="enable_partitionwise_aggregate"> + <term><varname>enable_partitionwise_aggregate</varname> (<type>boolean</type>) + <indexterm> + <primary><varname>enable_partitionwise_aggregate</varname> configuration parameter</primary> + </indexterm> + </term> + <listitem> + <para> + Enables or disables the query planner's use of partitionwise grouping + or aggregation, which allows grouping or aggregation on a partitioned + tables performed separately for each partition. If the <literal>GROUP + BY</literal> clause does not include the partition keys, only partial + aggregation can be performed on a per-partition basis, and + finalization must be performed later. Because partitionwise grouping + or aggregation can use significantly more CPU time and memory during + planning, the default is <literal>off</literal>. + </para> + </listitem> + </varlistentry> + <varlistentry id="guc-enable-seqscan" xreflabel="enable_seqscan"> <term><varname>enable_seqscan</varname> (<type>boolean</type>) <indexterm> |