Re: Records Number

Поиск
Список
Период
Сортировка
От Thomas Kellerer
Тема Re: Records Number
Дата
Msg-id gpoceg$js6$1@ger.gmane.org
обсуждение исходный текст
Ответ на Re: Records Number  (Richard Huxton <dev@archonet.com>)
Ответы Re: Records Number  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Richard Huxton, 17.03.2009 13:26:
> Enrico Pirozzi wrote:
>> and i would like to retrieve the number of records without make
>>
>> select count(*) from table
>>
>> I could use directly the table instead of select, and in this this
>> case I'm searching for
>> something like the reltuples field in the pg_class table, but I need
>> this value in real time.
>
> If you want an accurate, up-to-date count then you'll need to use
> count(*) or have a trigger keep a summary-count for you. A simple
> implementation will reduce concurrency to writes on that table however.
> Lots of discussion in the mailing-list archives on this.
>
Can a trigger solution really give an accurate count in a concurrent insert/delete scenario?

Thomas

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: PostgreSQL versus MySQL for GPS Data
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Records Number