Re: constant time count(*) ? - Mailing list pgsql-general

From Andrew Sullivan
Subject Re: constant time count(*) ?
Date
Msg-id 20031015184407.GE27479@libertyrms.info
Whole thread Raw
In response to constant time count(*) ?  (Mark Harrison <mh@pixar.com>)
List 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@libertyrms.info>                              M2P 2A8
                                         +1 416 646 3304 x110


pgsql-general by date:

Previous
From: "Dann Corbit"
Date:
Subject: Re: constant time count(*) ?
Next
From: Alejandro Forero Cuervo
Date:
Subject: Re: Getting error codes for failed queries?