Re: Huge Data
Shridhar Daithankar <shridhar_daithankar@myrealbox.com>
From: Shridhar Daithankar <shridhar_daithankar@myrealbox.com>
To: pgsql-general@postgresql.org
Date: 2004-01-14T12:42:41Z
Lists: pgsql-general
On Wednesday 14 January 2004 17:57, Sezai YILMAZ wrote: > Richard Huxton wrote: > >What are you using the count() for? > > I use count() for some statistics. Just to show how many records > collected so far. Rather than doing count(*), you should either cache the count in application memory or analyze often and use following. 'select reltuples from pg_class where relname = 'foo'; This would give you approximate count. I believe it should suffice for your needs. HTH Shridhar