Re: [GENERAL] Combining count() and row_number() as window functions

2017-01-19 Thread Stephen Frost
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 approach in which >

Re: [GENERAL] Combining count() and row_number() as window functions

2017-01-19 Thread Tom Lane
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 functions) are black boxes, i