Re: Window functions can't be used as LIMIT/FETCH FIRST alternative

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Navrotskiy Artem <bozaro(at)yandex(dot)ru>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Window functions can't be used as LIMIT/FETCH FIRST alternative
Date: 2017-05-20 16:37:53
Message-ID: CAKFQuwZ3SrJ1Xrmxw7-J=S1cJ39oXjJYGKbmDZ-NCxQQK5FeZA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, May 20, 2017 at 2:50 AM, Navrotskiy Artem <bozaro(at)yandex(dot)ru> wrote:

> This is especially unpleasant for expressions using RANK and DENSE_RANK,
> which can not simply be rewritten using LIMIT.
>

​They cannot anyway, at least not DENSE_RANK with ties.​

Others will have to speak to the dynamics involved with the overall current
behavior.

David J.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2017-05-20 16:52:38 Re: Partitioned Data and Locking
Previous Message Navrotskiy Artem 2017-05-20 09:50:33 Window functions can't be used as LIMIT/FETCH FIRST alternative