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

From Peter Eisentraut
Subject Re: Push down Aggregates below joins
Date
Msg-id 3b66fdb3-a121-5be7-e44e-aa8ec40a933a@2ndquadrant.com
Whole thread Raw
In response to Push down Aggregates below joins  (Heikki Linnakangas <hlinnaka@iki.fi>)
List pgsql-hackers
On 20.06.18 22:12, 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.

Because this patch moves a lot of code around, there are nontrivial
conflicts now.  I was able to apply it on top of
fb6accd27b99f5f91a7e9e5bd32b98a53fc6d6b8 based on the date.

With that, I'm getting test failures in partition_aggregate, like this

  Sort
    Sort Key: t2.y, (sum(t1.y)), (count(*))
-   ->  Append
-         ->  HashAggregate
-               Group Key: t2.y
...
+   ->  Result
+         ->  Append
+               ->  HashAggregate
+                     Group Key: t1.x
...

And there is apparently no expected/aggregate_pushdown.out file in the
patch set.

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


pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: location reporting in TAP test failures
Next
From: Peter Eisentraut
Date:
Subject: Re: PATCH: logical_work_mem and logical streaming of largein-progress transactions