Re: Slow COUNT - Mailing list pgsql-general

From Tino Wildenhain
Subject Re: Slow COUNT
Date
Msg-id 1133703649.5734.75.camel@Andrea.peacock.de
Whole thread Raw
In response to Re: Slow COUNT  (Guido Neitzer <guido.neitzer@pharmaline.de>)
Responses Re: Slow COUNT
List pgsql-general
Am Sonntag, den 04.12.2005, 14:02 +0100 schrieb Guido Neitzer:
> On 02.12.2005, at 20:02 Uhr, Jaime Casanova wrote:
>
> > so the way to do it is create a trigger that record in a table the
> > number of rows...
>
> As there are SO MANY questions about the "count(*)" issue, I wonder
> whether it makes sense to add a mechanism which does exactly the
> method mentioned above in a default PostgreSQL installation (perhaps
> switched of by default for other performance impacts)?!

I dont think this would match postgres style - to include
a kludge for a rarely usefull special case. I may be wrong
but personally I never needed unqualified count(*) on a
table to be very fast.

Doing something to enable aggregates in general to use
an existent index would be a nice ide imho.
(With all the visibility hinting in place)

Just my 0.02Ct.

++Tino



pgsql-general by date:

Previous
From: Guido Neitzer
Date:
Subject: Re: Slow COUNT
Next
From: Martijn van Oosterhout
Date:
Subject: Re: int to inet conversion