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