Re: Use incremental sort paths for window functions

2020-09-15 Thread David Rowley
On Tue, 15 Sep 2020 at 23:21, David Rowley wrote: > > On Tue, 15 Sep 2020 at 20:12, Daniel Gustafsson wrote: > > > > No comments on this version, LGTM. > > Cool. Many thanks for having a look. Pushed. 62e221e1c David

Re: Use incremental sort paths for window functions

2020-09-15 Thread David Rowley
On Tue, 15 Sep 2020 at 20:12, Daniel Gustafsson wrote: > > On that note, assume we have the below scenario: > > wfunc .. (order by a), .. (order by a,b), .. (order by a,b,c) > > Currently the windows will be ordered such that a,b,c is sorted first, with > a,b > and a not having to sort. I

Re: Use incremental sort paths for window functions

2020-09-15 Thread David Rowley
On Tue, 15 Sep 2020 at 05:19, Tomas Vondra wrote: > > On Wed, Jul 08, 2020 at 04:57:21PM +1200, David Rowley wrote: > >Over on [1] someone was asking about chained window paths making use > >of already partially sorted input. (The thread is on -general, so I > >guessed they're not using PG13.) >

Re: Use incremental sort paths for window functions

2020-09-15 Thread Daniel Gustafsson
> On 15 Sep 2020, at 01:17, David Rowley wrote: > > On Tue, 15 Sep 2020 at 00:02, Daniel Gustafsson wrote: >> >>> On 8 Jul 2020, at 06:57, David Rowley wrote: >>> >>> Over on [1] someone was asking about chained window paths making use >>> of already partially sorted input. (The thread is

Re: Use incremental sort paths for window functions

2020-09-14 Thread David Rowley
On Tue, 15 Sep 2020 at 00:02, Daniel Gustafsson wrote: > > > On 8 Jul 2020, at 06:57, David Rowley wrote: > > > > Over on [1] someone was asking about chained window paths making use > > of already partially sorted input. (The thread is on -general, so I > > guessed they're not using PG13.) > >

Re: Use incremental sort paths for window functions

2020-09-14 Thread Tomas Vondra
On Wed, Jul 08, 2020 at 04:57:21PM +1200, David Rowley wrote: Over on [1] someone was asking about chained window paths making use of already partially sorted input. (The thread is on -general, so I guessed they're not using PG13.) However, On checking PG13 to see if incremental sort would

Re: Use incremental sort paths for window functions

2020-09-14 Thread Daniel Gustafsson
> On 8 Jul 2020, at 06:57, David Rowley wrote: > > Over on [1] someone was asking about chained window paths making use > of already partially sorted input. (The thread is on -general, so I > guessed they're not using PG13.) The [1] reference wasn't qualified, do you remember which thread it

Use incremental sort paths for window functions

2020-07-07 Thread David Rowley
Over on [1] someone was asking about chained window paths making use of already partially sorted input. (The thread is on -general, so I guessed they're not using PG13.) However, On checking PG13 to see if incremental sort would help their case, I saw it didn't. Looking at the code I saw that