Re: Table Stats

Поиск
Список
Период
Сортировка
От Dennis Gearon
Тема Re: Table Stats
Дата
Msg-id 3F2A857B.4070607@cvc.net
обсуждение исходный текст
Ответ на Re: Table Stats  (Ron Johnson <ron.l.johnson@cox.net>)
Ответы Re: Table Stats  (Ron Johnson <ron.l.johnson@cox.net>)
Список pgsql-general
There has been discussion of making select count(*) fast. Is this in 7.4 or will it be in 7.5?

Ron Johnson wrote:

> On Thu, 2003-07-31 at 23:23, Dennis Gearon wrote:
>
>>It will only be at a given point in time, since datasbases are by
>>design, realtime/concurrent applications.
>>
>>do:
>>
>>SELECT COUNT(*) FROM table_name;
>>
>>Should give you what you want.
>
>
> It'll give him what he wants, but not quickly, if it's a 10/20/etc
> M row table.
>
> One hack is:
> CREATE TABLE T_CARDINALITY (
> RELATION_NAME    CHAR(31) PRIMARY KEY,
> CARDINALITY      BIGINT );
>
> Then put ON INSERT/ON DELETE triggers on each table you want to
> track that increment/decrement T_CARDINALITY.CARDINALITY at the
> appropriate moment.
>
>
>>Jeff Davidson wrote:
>>
>>
>>>Hi!
>>>
>>>Is there any quick way to determine how many rows exist in a given table?
>
>


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

Предыдущее
От: Dennis Gearon
Дата:
Сообщение: Re: extract and time zones
Следующее
От: Tom Lane
Дата:
Сообщение: Re: UPDATE sql question