Re: Push down Aggregates below joins - Mailing list pgsql-hackers

From Tomas Vondra
Subject Re: Push down Aggregates below joins
Date
Msg-id 051afb2c-e314-9ddb-b752-754d64288011@2ndquadrant.com
Whole thread Raw
In response to Push down Aggregates below joins  (Heikki Linnakangas <hlinnaka@iki.fi>)
Responses Re: Push down Aggregates below joins
List pgsql-hackers
On 06/20/2018 10:12 PM, Heikki Linnakangas wrote:
> Currently, the planner always first decides the scan/join order, and
> adds Group/Agg nodes on top of the joins. Sometimes it would be legal,
> and beneficial, to perform the aggregation below a join. I've been
> hacking on a patch to allow that.
> 

There was a patch [1] from Antonin Houska aiming to achieve something
similar. IIRC it aimed to push the aggregate down in more cases,
leveraging the partial aggregation stuff. I suppose your patch only aims
to do the pushdown when the two-phase aggregation is not needed?

[1] https://www.postgresql.org/message-id/flat/9666.1491295317@localhost

regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: Push down Aggregates below joins
Next
From: Bruce Momjian
Date:
Subject: Re: [Proposal] Table-level Transparent Data Encryption (TDE) and KeyManagement Service (KMS)