Re: Aggregate Push Down - Performing aggregation on foreign server - Mailing list pgsql-hackers

From Jeevan Chalke
Subject Re: Aggregate Push Down - Performing aggregation on foreign server
Date
Msg-id CAM2+6=VjnVSUSaByH4iODuKTrcj9Db_nP8RmZr54t4H2xv9wRA@mail.gmail.com
Whole thread Raw
In response to Re: Aggregate Push Down - Performing aggregation on foreign server  (Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>)
Responses Re: Aggregate Push Down - Performing aggregation on foreign server  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers


On Thu, Sep 8, 2016 at 10:41 PM, Ashutosh Bapat <ashutosh.bapat@enterprisedb.com> wrote:


I think we should try to measure performance gain because of aggregate pushdown. The EXPLAIN
doesn't show actual improvement in the execution times.

I did performance testing for aggregate push down and see good performance
with the patch.

Attached is the script I have used to get the performance numbers along with
the results I got with and without patch (pg_agg_push_down_v3.patch).  Also
attached few GNU plots from the readings I got.  These were run on my local
VM having following details:

Linux centos7 3.10.0-327.28.3.el7.x86_64 #1 SMP Thu Aug 18 19:05:49 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
RAM alloted: 8 GB
CPUs alloted: 8
postgresql.conf is default.

With aggregate push down I see around 12x performance for count(*) operation.
In another test, I have observed that if number of groups returned from
remote server is same as that of input rows, then aggregate push down performs
slightly poor which I think is expected. However in all other cases where
number of groups are less than input rows, pushing down aggregate gives better
performance than performing grouping on the local server.

I did this performance testing on my local setup. I would expected even better
numbers on a specialized high-end performance machine.  I would be more than
happy if someone does this testing on such high-end machine.

Let me know if you need any help.

Thanks

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

Attachment

pgsql-hackers by date:

Previous
From: Ernst-Georg Schmid
Date:
Subject: Re: How to inspect tuples during execution of a plan?
Next
From: Albe Laurenz
Date:
Subject: Re: Add PGDLLEXPORT to PG_FUNCTION_INFO_V1