From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Maiquel Grassi <grassi(at)hotmail(dot)com(dot)br> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | New Window Function: ROW_NUMBER_DESC() OVER() ? |
Date: | 2024-01-16 17:52:42 |
Message-ID: | CAKFQuwbciBQz-duy2q2Rxfi45zdEk+7A6V8748wyZ+5p-DU6Qw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tuesday, January 16, 2024, Maiquel Grassi <grassi(at)hotmail(dot)com(dot)br> wrote:
> Hi,
>
> Count() over() - row_number() over()
>
> But if my dataset is significantly large? Wouldn't calling two window
> functions instead of one be much slower?
> Is *count() over() - row_number() over()* faster than *row_number_desc()
> over()*?
>
>
I doubt it is materially different, you need that count regardless so the
effort is expended no matter if you put it in an SQL expression or build it
into the window function. But as you are the one arguing for the new
feature demonstrating that the status quo is deficient is your job.
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Alexander Lakhin | 2024-01-16 18:00:01 | Re: Build-farm - intermittent error in 031_column_list.pl |
Previous Message | Maiquel Grassi | 2024-01-16 17:08:24 | RE: New Window Function: ROW_NUMBER_DESC() OVER() ? |