Re: number of rows

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: number of rows
Дата
Msg-id 447.1055513524@sss.pgh.pa.us
обсуждение исходный текст
Ответ на number of rows  ("Marcus Andree S. Magalhaes" <marcus.magalhaes@vlinfo.com.br>)
Список pgsql-novice
"Marcus Andree S. Magalhaes" <marcus.magalhaes@vlinfo.com.br> writes:
> I mean, is there any internal variable that stores the number of
> rows instead of sequencially scanning the entire database??

If a very approximate answer is good enough, you could consult
pg_class.reltuples, which is good as of the last VACUUM.  There
is no on-the-fly maintenance of a row count, for a number of good
reasons that you can read about in the PG list archives.

            regards, tom lane

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

Предыдущее
От: Jeff Eckermann
Дата:
Сообщение: Re: Exporting data from PostgreSQL
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Exporting data from PostgreSQL