pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Teach planner about more monotonic window functions
3+ messages / 3 participants
[nested] [flat]
* pgsql: Teach planner about more monotonic window functions
@ 2023-01-27 03:09 David Rowley <drowley@postgresql.org>
0 siblings, 1 reply; 3+ messages in thread
From: David Rowley @ 2023-01-27 03:09 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Teach planner about more monotonic window functions
9d9c02ccd introduced runConditions for window functions to allow
monotonic window function evaluation to be made more efficient when the
window function value went beyond some value that it would never go back
from due to its monotonic nature. That commit added prosupport functions
to inform the planner that row_number(), rank(), dense_rank() and some
forms of count(*) were monotonic. Here we add support for ntile(),
cume_dist() and percent_rank().
Reviewed-by: Melanie Plageman
Discussion: https://postgr.es/m/CAApHDvqR+VqB8s+xR-24bzJbU8xyFrBszJ17qKgECf7cWxLCaA@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/456fa635a909ee36f73ca84d340521bd730f265f
Modified Files
--------------
src/backend/utils/adt/windowfuncs.c | 30 ++++++++++++++++++++++++++++++
src/test/regress/expected/window.out | 26 ++++++++++++++------------
src/test/regress/sql/window.sql | 10 ++++++----
3 files changed, 50 insertions(+), 16 deletions(-)
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: pgsql: Teach planner about more monotonic window functions
@ 2023-01-27 19:00 Alvaro Herrera <alvherre@alvh.no-ip.org>
parent: David Rowley <drowley@postgresql.org>
0 siblings, 1 reply; 3+ messages in thread
From: Alvaro Herrera @ 2023-01-27 19:00 UTC (permalink / raw)
To: David Rowley <drowley@postgresql.org>; +Cc: pgsql-committers@lists.postgresql.org
On 2023-Jan-27, David Rowley wrote:
> Teach planner about more monotonic window functions
>
> 9d9c02ccd introduced runConditions for window functions to allow
> monotonic window function evaluation to be made more efficient when the
> window function value went beyond some value that it would never go back
> from due to its monotonic nature. That commit added prosupport functions
> to inform the planner that row_number(), rank(), dense_rank() and some
> forms of count(*) were monotonic. Here we add support for ntile(),
> cume_dist() and percent_rank().
I think this commit missed a catversion bump.
--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: pgsql: Teach planner about more monotonic window functions
@ 2023-01-27 20:25 David Rowley <dgrowleyml@gmail.com>
parent: Alvaro Herrera <alvherre@alvh.no-ip.org>
0 siblings, 0 replies; 3+ messages in thread
From: David Rowley @ 2023-01-27 20:25 UTC (permalink / raw)
To: Alvaro Herrera <alvherre@alvh.no-ip.org>; +Cc: pgsql-committers@lists.postgresql.org
On Sat, 28 Jan 2023 at 08:12, Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
> I think this commit missed a catversion bump.
I'd agree with you if the patch had added any new prosupport
functions, but all it did was modify 3 existing ones. I'm unaware of
the reason why a catversion bump would be required for doing that.
David
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2023-01-27 20:25 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-01-27 03:09 pgsql: Teach planner about more monotonic window functions David Rowley <drowley@postgresql.org>
2023-01-27 19:00 ` Alvaro Herrera <alvherre@alvh.no-ip.org>
2023-01-27 20:25 ` David Rowley <dgrowleyml@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox