pgsql: Teach planner about more monotonic window functions - Mailing list pgsql-committers

From David Rowley
Subject pgsql: Teach planner about more monotonic window functions
Date
Msg-id E1pLF72-0007Dl-O6@gemulon.postgresql.org
Whole thread Raw
Responses Re: pgsql: Teach planner about more monotonic window functions  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-committers
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(-)


pgsql-committers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: pgsql: Adjust interaction of CREATEROLE with role properties.
Next
From: Tom Lane
Date:
Subject: Re: pgsql: Adjust interaction of CREATEROLE with role properties.