Re: Aggregate Push Down - Performing aggregation on foreign server

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Jeevan Chalke <jeevan(dot)chalke(at)enterprisedb(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Aggregate Push Down - Performing aggregation on foreign server
Date: 2016-08-31 06:26:49
Message-ID: CAFj8pRCvn59xcKbmSHfQA3nugAmVyHY-Nfj_Xzwp1euLWV2R+A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2016-08-31 8:17 GMT+02:00 Jeevan Chalke <jeevan(dot)chalke(at)enterprisedb(dot)com>:

>
>
> On Tue, Aug 30, 2016 at 6:51 PM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
> wrote:
>
>> Hi
>>
>> 2016-08-30 15:02 GMT+02:00 Jeevan Chalke <jeevan(dot)chalke(at)enterprisedb(dot)com>
>> :
>>
>>> Hi all,
>>>
>>> Attached is the patch which adds support to push down aggregation and
>>> grouping
>>> to the foreign server for postgres_fdw. Performing aggregation on foreign
>>> server results into fetching fewer rows from foreign side as compared to
>>> fetching all the rows and aggregating/grouping locally. Performing
>>> grouping on
>>> foreign server may use indexes if available. So pushing down aggregates/
>>> grouping on foreign server performs better than doing that locally.
>>> (Attached
>>> EXPLAIN output for few simple grouping queries, with and without push
>>> down).
>>>
>>
>> is it work without FDW too?. It can be pretty interesting too.
>>
>
> No. Aggrgate push down is supported through the GetForeignUpperPaths() hook
> added for postgres_fdw. Thus it works only with postgres_fdw.
>
> Do you mean whether this works with any extensions via implementing
> create_upper_paths_hook() function?
> The answer is No. This patch does not touch this hook.
>

It is pity - lot of performance issues are related to this missing feature.

Regards

Pavel

>
>
>>
>> Regards
>>
>> Pavel
>>
>>
>>>
>>>
>>
>
> Thanks
> --
> Jeevan B Chalke
> Principal Software Engineer, Product Development
> EnterpriseDB Corporation
> The Enterprise PostgreSQL Company
>
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2016-08-31 06:35:33 Re: Missing checks when malloc returns NULL...
Previous Message Jeevan Chalke 2016-08-31 06:17:16 Re: Aggregate Push Down - Performing aggregation on foreign server