Re: constant time count(*) ?

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Mark Harrison <mh(at)pixar(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: constant time count(*) ?
Date: 2003-10-15 18:25:39
Message-ID: Pine.LNX.4.44.0310152025050.21950-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Mark Harrison writes:

> Is there a way to optimize count(*) such that it does not have
> to do a sequential scan?

No. If you need to count a lot, you need to store the information
separately.

--
Peter Eisentraut peter_e(at)gmx(dot)net

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dann Corbit 2003-10-15 18:28:44 Re: constant time count(*) ?
Previous Message Peter Eisentraut 2003-10-15 18:21:57 Re: Getting error codes for failed queries?