Re: Push down Aggregates below joins

2018-10-01 Thread Michael Paquier
On Fri, Aug 03, 2018 at 04:50:11PM +0200, Antonin Houska wrote: > Antonin Houska wrote: > > > I didn't have enough time to separate "your functionality" and can do it > > when > > I'm back from vacation. > > So I've separated the code that does not use the 2-stage replication (and > therefore t

Re: Push down Aggregates below joins

2018-07-01 Thread Peter Eisentraut
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. B

Re: Push down Aggregates below joins

2018-06-22 Thread Antonin Houska
Heikki Linnakangas wrote: > Ah, cool! I missed that thread earlier. Yes, seems like we've been hacking on > the same feature. Let's compare! > > I've been using this paper as a guide: > > "Including Group-By in Query Optimization", by Surajit Chaudhuri and Kyuseok > Shim: > https://pdfs.semanti

Re: Push down Aggregates below joins

2018-06-21 Thread Heikki Linnakangas
On 21/06/18 09:11, Antonin Houska wrote: Tomas Vondra wrote: 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

Re: Push down Aggregates below joins

2018-06-20 Thread Antonin Houska
Tomas Vondra wrote: > 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 > > ha

Re: Push down Aggregates below joins

2018-06-20 Thread Tomas Vondra
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.

Re: Push down Aggregates below joins

2018-06-20 Thread Tomas Vondra
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.