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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [GENERAL] Combining count() and row_number() as window functions
Дата
Msg-id 16982.1484835633@sss.pgh.pa.us
обсуждение исходный текст
Ответ на [GENERAL] Combining count() and row_number() as window functions  (Thomas Kellerer <spam_eater@gmx.net>)
Ответы Re: [GENERAL] Combining count() and row_number() as window functions  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-general
Thomas Kellerer <spam_eater@gmx.net> writes:
> I assumed that the count() wouldn't increase the runtime of the query as the result of the row_number() can be used
tocalculate that.  

No such knowledge exists in Postgres.  Given our general approach in which
functions (including window functions) are black boxes, it's hard to see
how it could be done in a way that wasn't a ugly kluge.

            regards, tom lane


В списке pgsql-general по дате отправления:

Предыдущее
От: Kenneth Marshall
Дата:
Сообщение: Re: [GENERAL] migrate Sql Server database to PostgreSql
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: [GENERAL] Queries are taking way longer in 9.6 than 9.5