Re: Todo: Teach planner to evaluate multiple windows in the optimal order

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Ankit Kumar Pandey <itsankitkp(at)gmail(dot)com>
Cc: pghackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Vik Fearing <vik(at)postgresfriends(dot)org>
Subject: Re: Todo: Teach planner to evaluate multiple windows in the optimal order
Date: 2023-01-07 22:05:15
Message-ID: CAApHDvr0CscJDDgPDvjwQc8M8WBvfTzfAkehxJBw1qOVO-oqAw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, 8 Jan 2023 at 01:52, Ankit Kumar Pandey <itsankitkp(at)gmail(dot)com> wrote:
> I am just wondering though, why can we not do top-N sort
> in optimized version if we include limit clause? Is top-N sort is
> limited to non strict sorting or
> cases last operation before limit is sort? .

Maybe the sort bound can be pushed down. You'd need to adjust
ExecSetTupleBound() so that it pushes the bound through
WindowAggState.

David

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2023-01-07 22:17:32 Re: delayed initialization in worktable scan
Previous Message Andres Freund 2023-01-07 21:47:56 Re: pgsql: Delay commit status checks until freezing executes.