Re: Returning the total number of rows as a separate column when using limit

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Returning the total number of rows as a separate column when using limit
Дата
Msg-id 18728.1194272302@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Returning the total number of rows as a separate column when using limit  (Andreas Joseph Krogh <andreak@officenet.no>)
Ответы Re: Returning the total number of rows as a separate column when using limit
Список pgsql-sql
Andreas Joseph Krogh <andreak@officenet.no> writes:
> AFAICS the information about the *total* number of rows is in the "result" 
> somehow. When I execute a "limit 1" query with EXPLAIN ANALYZE, I se the 
> total number of columns in "rows=200819", so the information is there.

That's only an estimate.  Since the query doesn't get executed to
completion thanks to the LIMIT, Postgres really has no idea whether
the estimate is accurate.
        regards, tom lane


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

Предыдущее
От: Kenneth Gonsalves
Дата:
Сообщение: changing encoding of a postgres database
Следующее
От: Andreas Joseph Krogh
Дата:
Сообщение: Re: Returning the total number of rows as a separate column when using limit