On Tuesday, January 16, 2024, Maiquel Grassi <
grassi@hotmail.com.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.