Re: constant time count(*) ?

From: Andrew Sullivan <andrew(at)libertyrms(dot)info>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: constant time count(*) ?
Date: 2003-10-15 18:44:09
Message-ID: 20031015184407.GE27479@libertyrms.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Oct 15, 2003 at 11:00:10AM -0700, Mark Harrison wrote:
>
> Is there a way to optimize count(*) such that it does not have
> to do a sequential scan? We use this on some big tables and it
> is slowing down processing quite a lot.

No. There's a busload of discussion on this topic in the archives.
If you need an approximate value, you can get it from the system
tables.

A

--
----
Andrew Sullivan 204-4141 Yonge Street
Afilias Canada Toronto, Ontario Canada
<andrew(at)libertyrms(dot)info> M2P 2A8
+1 416 646 3304 x110

In response to

Browse pgsql-general by date

  From Date Subject
Next Message scott.marlowe 2003-10-15 18:44:55 Re: Porting Code to Postgresql
Previous Message Dann Corbit 2003-10-15 18:28:44 Re: constant time count(*) ?