 

> -----Original Message-----
> From: Robert Treat [mailto:xzilla@users.sourceforge.net] 
> Sent: 12 October 2004 21:21
> To: Dave Page
> Cc: pgsql-hackers@postgresql.org
> Subject: Re: [HACKERS] PL/PgSQL for counting all rows in all tables.
> 
> 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.  

Yeah, that's exactly what can happen. If it makes you feel any better
about doing it in phppgadmin, then we never got any complaints about it!

We simply rely on the fact that it's labelled as an estimate. I can't
see that there's any other way around it that doesn't require running a
potentially very expensive ANALYZE to update the stats.

Regards, Dave

Wed, 13 Oct 2004 08:45:33 +0100
"Dave Page" <dpage@vale-housing.co.uk>
Re: PL/PgSQL for counting all rows in all tables.