Re: PL/PgSQL for counting all rows in all tables. - Mailing list pgsql-hackers

From Andreas Pflug
Subject Re: PL/PgSQL for counting all rows in all tables.
Date
Msg-id 416C4324.1080301@pse-consulting.de
Whole thread Raw
In response to Re: PL/PgSQL for counting all rows in all tables.  (Robert Treat <xzilla@users.sourceforge.net>)
List pgsql-hackers
Robert Treat wrote:

>>
>>Right-click the table object and select 'Count' on the current versions.
>>Previously, iirc it showed the message 'Refresh table to count' in the
>>actual count field, so you did a right-click -> Refresh.
>>
> 
> 
> Maybe I didn't phrase that quite right. How would a user know that he needs to 
> do a real count?  For example, if I have a table with est 1 million rows, and 
> I load another 1 million rows into it, wont pgadmin show me 1 million rows 
> until I run an analyze? Even if I run a manual count, wont it show 1 million 
> next time I come into the application, and that time I may not realize that 
> the table is off by 1 million rows so I take the estimated count at face 
> value.  

pgAdmin will either show the true row count from a SELECT COUNT(*), or 
"not counted". The last rowcount from vacuum is named "estimated row 
count", so it's clearly distinguishable which number is counted and 
which is estimated.

Regards,
Andreas




pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: open item: tablespace handing in pg_dump/pg_restore
Next
From: Tom Lane
Date:
Subject: Re: Hypothetical Indexes