Re: Huge Data - Mailing list pgsql-general

From Shridhar Daithankar
Subject Re: Huge Data
Date
Msg-id 200401141812.41884.shridhar_daithankar@myrealbox.com
Whole thread Raw
In response to Re: Huge Data  (Sezai YILMAZ <sezai.yilmaz@pro-g.com.tr>)
Responses Re: Huge Data  (Sezai YILMAZ <sezai.yilmaz@pro-g.com.tr>)
List 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


pgsql-general by date:

Previous
From: Sezai YILMAZ
Date:
Subject: Re: Huge Data
Next
From: "Matthew Lunnon"
Date:
Subject: Re: Huge Data