Re: [HACKERS] Print correct startup cost for the group aggregate.

2017-03-08 Thread Robert Haas
On Sun, Mar 5, 2017 at 11:32 PM, Ashutosh Bapat wrote: >> I think there have been >> previous discussions of switching over to the practice for which you >> are advocating here, but my impression (without researching) is that >> the current practice is more like what Rushabh did. > > I am not sure

Re: [HACKERS] Print correct startup cost for the group aggregate.

2017-03-06 Thread Ashutosh Bapat
> > > I understood you reasoning of why startup_cost = input_startup_cost and not > input_total_cost for aggregation by sorting. But what I didn't understand is > how come higher startup cost for aggregation by sorting would force hash > aggregation to be chosen? I am not clear about this part. Se

Re: [HACKERS] Print correct startup cost for the group aggregate.

2017-03-06 Thread Rushabh Lathia
Thanks Ashutosh & Robert for the explanation. On Mon, Mar 6, 2017 at 10:02 AM, Ashutosh Bapat < ashutosh.ba...@enterprisedb.com> wrote: > On Sat, Mar 4, 2017 at 2:50 PM, Robert Haas wrote: > > On Thu, Mar 2, 2017 at 6:48 PM, Ashutosh Bapat > > wrote: > >> On Thu, Mar 2, 2017 at 6:06 PM, Rushabh

Re: [HACKERS] Print correct startup cost for the group aggregate.

2017-03-05 Thread Ashutosh Bapat
On Sat, Mar 4, 2017 at 2:50 PM, Robert Haas wrote: > On Thu, Mar 2, 2017 at 6:48 PM, Ashutosh Bapat > wrote: >> On Thu, Mar 2, 2017 at 6:06 PM, Rushabh Lathia >> wrote: >>> While reading through the cost_agg() I found that startup cost for the >>> group aggregate is not correctly assigned. Due

Re: [HACKERS] Print correct startup cost for the group aggregate.

2017-03-04 Thread Robert Haas
On Thu, Mar 2, 2017 at 6:48 PM, Ashutosh Bapat wrote: > On Thu, Mar 2, 2017 at 6:06 PM, Rushabh Lathia > wrote: >> While reading through the cost_agg() I found that startup cost for the >> group aggregate is not correctly assigned. Due to this explain plan is >> not printing the correct startup

Re: [HACKERS] Print correct startup cost for the group aggregate.

2017-03-02 Thread Ashutosh Bapat
On Thu, Mar 2, 2017 at 6:48 PM, Ashutosh Bapat wrote: > On Thu, Mar 2, 2017 at 6:06 PM, Rushabh Lathia > wrote: >> Hi, >> >> While reading through the cost_agg() I found that startup cost for the >> group aggregate is not correctly assigned. Due to this explain plan is >> not printing the correc

Re: [HACKERS] Print correct startup cost for the group aggregate.

2017-03-02 Thread Ashutosh Bapat
On Thu, Mar 2, 2017 at 6:06 PM, Rushabh Lathia wrote: > Hi, > > While reading through the cost_agg() I found that startup cost for the > group aggregate is not correctly assigned. Due to this explain plan is > not printing the correct startup cost. > > Without patch: > > postgres=# explain select