Tom,
* Tom Lane (t...@sss.pgh.pa.us) wrote:
> Thomas Kellerer writes:
> > I assumed that the count() wouldn't increase the runtime of the query as
> > the result of the row_number() can be used to calculate that.
>
> No such knowledge exists in Postgres. Given our general
Thomas Kellerer writes:
> I assumed that the count() wouldn't increase the runtime of the query as the
> result of the row_number() can be used to calculate that.
No such knowledge exists in Postgres. Given our general approach in which
functions (including window
I was playing around with a query that essentially looked something like this:
select row_number() over (order by foo_date) as rn,
count(*) over () as total_count,
f.*
from foo f;
(The actual query limits the output based on the row_number() for pagination