Re: Avoid extra Sort nodes between WindowAggs when sorting can bereused - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: Avoid extra Sort nodes between WindowAggs when sorting can bereused
Date
Msg-id AC8E7898-F5FD-431B-B1DF-5FBD0B9538E3@yesql.se
Whole thread Raw
In response to Re: Avoid extra Sort nodes between WindowAggs when sorting can be reused  (Masahiko Sawada <sawada.mshk@gmail.com>)
Responses Re: Avoid extra Sort nodes between WindowAggs when sorting can be reused  (Masahiko Sawada <sawada.mshk@gmail.com>)
List pgsql-hackers
> On 2 Jul 2018, at 14:01, Masahiko Sawada <sawada.mshk@gmail.com> wrote:

> Thank you for updating the patch! There are two review comments.

Thanks for reviewing!

> The current select_active_windows() function compares the all fields
> of WindowClause for the sorting but with this patch we compare only
> tleSortGroupRef, sortop and the number of uniqueOrder. I think this
> leads a degradation as follows.

You are right, that was an oversight.  The attached patch takes a stab at
fixing this.

> s/readibility/readability/

Fixed.

cheers ./daniel


Attachment

pgsql-hackers by date:

Previous
From: Andrew Gierth
Date:
Subject: Re: Should contrib modules install .h files?
Next
From: Tom Lane
Date:
Subject: Re: Unexpected behavior of DROP VIEW/TABLE IF EXISTS