Re: SELECT COUNT(*) execution time on large tables (v9.0.4-1)

Поиск
Список
Период
Сортировка
От Greg Smith
Тема Re: SELECT COUNT(*) execution time on large tables (v9.0.4-1)
Дата
Msg-id 4DE1B560.2050603@2ndQuadrant.com
обсуждение исходный текст
Ответ на SELECT COUNT(*) execution time on large tables (v9.0.4-1)  ("Carlos Sotto Maior \(SIM\)" <csotto@sistemassim.com.br>)
Список pgsql-general
On 05/27/2011 12:41 PM, Carlos Sotto Maior (SIM) wrote:
> I have browsed catalog tables, digging for a real time Row.count but  so far
> did not find any.
>

See http://wiki.postgresql.org/wiki/Slow_Counting which shows you where
the one system count estimate is at, as well as suggesting links to
where you can find alternate approaches here.  If you need an exact
count and can't afford to generate a full query to find one, some sort
of trigger-based approach is likely where you'll need to go.

--
Greg Smith   2ndQuadrant US    greg@2ndQuadrant.com   Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support  www.2ndQuadrant.us
"PostgreSQL 9.0 High Performance": http://www.2ndQuadrant.com/books


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

Предыдущее
От: Greg Smith
Дата:
Сообщение: Re: Inspecting a DB - psql or system tables ?
Следующее
От: Greg Smith
Дата:
Сообщение: Re: Regular disk activity of an idle DBMS