Re: Huge Data

From: Shridhar Daithankar <shridhar_daithankar(at)myrealbox(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Huge Data
Date: 2004-01-14 12:42:41
Message-ID: 200401141812.41884.shridhar_daithankar@myrealbox.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Matthew Lunnon 2004-01-14 12:52:31 Re: Huge Data
Previous Message Sezai YILMAZ 2004-01-14 12:39:24 Re: Huge Data