Re: Table Stats

Поиск
Список
Период
Сортировка
Искать
От
Shridhar Daithankar
Тема
Re: Table Stats
Дата
Msg-id
3F2AC790.28803.15693B21@localhost
Ответ на
Re: Table Stats (Ron Johnson)
Список
Дерево обсуждения
Table Stats Jeff Davidson <jeff@panopticpix.com>
Re: Table Stats Dennis Gearon <gearond@cvc.net>
Re: Table Stats Ron Johnson <ron.l.johnson@cox.net>
Re: Table Stats Dennis Gearon <gearond@cvc.net>
Re: Table Stats Ron Johnson <ron.l.johnson@cox.net>
Re: Table Stats "Shridhar Daithankar" <shridhar_daithankar@persistent.co.in>
On 1 Aug 2003 at 9:14, 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 );

How about 

select reltuples from pg_class where relname='mytablename';

It is as accurate as your last vacuum..

Bye
 Shridhar

--
Strategy:	A long-range plan whose merit cannot be evaluated until sometime	
after those creating it have left the organization.

В списке pgsql-general по дате отправления
От: Johnson, Shaunn
Дата:
Сообщение: PC color icon data?
От: Ron Johnson
Дата:
Сообщение: Re: How to do?
FAQ