Monotonic WindowFunc support for ntile(), percent_rank() and cume_dist()
От
David Rowley
Тема
Monotonic WindowFunc support for ntile(), percent_rank() and cume_dist()
Дата
Msg-id
CAApHDvqR+VqB8s+xR-24bzJbU8xyFrBszJ17qKgECf7cWxLCaA@mail.gmail.com
Список
Дерево обсуждения
Monotonic WindowFunc support for ntile(), percent_rank() and cume_dist() David Rowley <dgrowleyml@gmail.com>
Re: Monotonic WindowFunc support for ntile(), percent_rank() and cume_dist() Melanie Plageman <melanieplageman@gmail.com>
Re: Monotonic WindowFunc support for ntile(), percent_rank() and cume_dist() David Rowley <dgrowleyml@gmail.com>
Re: Monotonic WindowFunc support for ntile(), percent_rank() and cume_dist() Melanie Plageman <melanieplageman@gmail.com>
Re: Monotonic WindowFunc support for ntile(), percent_rank() and cume_dist() David Rowley <dgrowleyml@gmail.com>
9d9c02ccd [1] added infrastructure in the query planner and executor so that the executor would know to stop processing a monotonic WindowFunc when its value went beyond what some qual in the outer query could possibly match in future evaluations due to the WindowFunc's monotonic nature. In that commit, support was added so that the optimisation would work for row_number(), rank(), dense_rank() and forms of count(*). On further inspection, it looks like the same can be done for ntile(), percent_rank() and cume_dist(). These WindowFuncs are always monotonically increasing. I've attached a trivial patch to add the required support request type to the existing prosupport functions for these window functions. David [1] https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=9d9c02ccd
В списке pgsql-hackers по дате отправления
От: Peter Smith
Дата: