Re: [HACKERS] Partition-wise aggregation/grouping
От | Jeevan Chalke |
---|---|
Тема | Re: [HACKERS] Partition-wise aggregation/grouping |
Дата | |
Msg-id | CAM2+6=X5XB_VHB6L+zBdQY=5nh_xDhNDkg6zGAU+YyetbG+HTA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [HACKERS] Partition-wise aggregation/grouping (Robert Haas <robertmhaas@gmail.com>) |
Ответы |
Re: [HACKERS] Partition-wise aggregation/grouping
Re: [HACKERS] Partition-wise aggregation/grouping |
Список | pgsql-hackers |
On Sat, Mar 3, 2018 at 12:12 AM, Robert Haas <robertmhaas@gmail.com> wrote:
On Thu, Mar 1, 2018 at 4:52 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> This is not a full review, but I'm out of time for right now.
Another thing I see here now is that create_grouping_paths() and
create_child_grouping_paths() are extremely similar. Isn't there some
way we can refactor things so that we can reuse the code instead of
duplicating it?
Yes. I too observed the same after our re-design.
To avoid code duplication, I am now calling create_grouping_paths() for child relation too.
However, to perform Gather or Gather Merge once we have all partial paths ready, and to avoid too many existing code rearrangement, I am calling try_partitionwise_grouping() before we do any aggregation/grouping on whole relation. By doing this, we will be having all partial paths in partially_grouped_rel and then existing code will do required finalization along with any Gather or Gather Merge, if required.
However, to perform Gather or Gather Merge once we have all partial paths ready, and to avoid too many existing code rearrangement, I am calling try_partitionwise_grouping() before we do any aggregation/grouping on whole relation. By doing this, we will be having all partial paths in partially_grouped_rel and then existing code will do required finalization along with any Gather or Gather Merge, if required.
Please have a look over attached patch-set and let me know if it needs further changes.
Thanks
--
Jeevan Chalke
Technical Architect, Product Development
EnterpriseDB Corporation
The Enterprise PostgreSQL Company
Technical Architect, Product Development
EnterpriseDB Corporation
The Enterprise PostgreSQL Company
Вложения
В списке pgsql-hackers по дате отправления: