ROWS vs RANGE in release notes for pg 16
The release notes for Postgres 16 says here:
https://www.postgresql.org/docs/16/release-16.html#RELEASE-16-PERFORMANCE
Allow window functions to use ROWS mode internally when RANGE mode is
specified but unnecessary (David Rowley)
But the fix also applies to the much more common case where no mode has
been specified, RANGE unfortunately being the default - including the most
common use case "row_number() OVER (ORDER BY col)". This is what made me
investigate, test and eventually propose a fix in the first place. See:
/messages/by-id/CAGHENJ7LBBszxS+SkWWFVnBmOT2oVsBhDMB1DFrgerCeYa_DyA@mail.gmail.com
/messages/by-id/CAApHDvohAKEtTXxq7Pc-ic2dKT8oZfbRKeEJP64M0B6+S88z+A@mail.gmail.com
Also, I was hoping to get a mention in the release note for working this
out:
Allow window functions to use the faster ROWS mode internally when RANGE
mode is specified or would be used by default, but unnecessary (David
Rowley, Erwin Brandstetter)
Regards
Erwin
Hi Erwin,
On 8/18/23 7:41 PM, Erwin Brandstetter wrote:
The release notes for Postgres 16 says here:
https://www.postgresql.org/docs/16/release-16.html#RELEASE-16-PERFORMANCE <https://www.postgresql.org/docs/16/release-16.html#RELEASE-16-PERFORMANCE>Allow window functions to use ROWS mode internally when RANGE mode is
specified but unnecessary (David Rowley)
But the fix also applies to the much more common case where no mode has
been specified, RANGE unfortunately being the default - including the
most common use case "row_number() OVER (ORDER BY col)". This is what
made me investigate, test and eventually propose a fix in the first
place. See:/messages/by-id/CAGHENJ7LBBszxS+SkWWFVnBmOT2oVsBhDMB1DFrgerCeYa_DyA@mail.gmail.com </messages/by-id/CAGHENJ7LBBszxS+SkWWFVnBmOT2oVsBhDMB1DFrgerCeYa_DyA@mail.gmail.com>
/messages/by-id/CAApHDvohAKEtTXxq7Pc-ic2dKT8oZfbRKeEJP64M0B6+S88z+A@mail.gmail.com </messages/by-id/CAApHDvohAKEtTXxq7Pc-ic2dKT8oZfbRKeEJP64M0B6+S88z+A@mail.gmail.com>Also, I was hoping to get a mention in the release note for working this
out:Allow window functions to use the faster ROWS mode internally when
RANGE mode is specified or would be used by default, but unnecessary
(David Rowley, Erwin Brandstetter)
Thanks for flagging. I suggest adding the comment to the release notes
thread on -hackers:
/messages/by-id/ZGaPa7M3gc2THeDJ@momjian.us
Jonathan