count(*) optimization

From: "Nikola Ivacic" <nikola(at)rs-pi(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: count(*) optimization
Date: 2003-01-08 16:04:40
Message-ID: 024d01c2b72f$a6a7dcc0$1100a8c0@rspi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi

I have trouble executing count(*) statement.
On a large dataset it takes quite a while to return result.
Is there any other way to get number of tupples in relation
or is the only way to optimize count() function to index it?

thanks

Nikola

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Nikola Ivacic 2003-01-08 16:15:23 Re: count(*) optimization
Previous Message Rajesh Kumar Mallah. 2003-01-08 15:37:00 Re: Search and Replace