Re: count(*) performance improvement ideas - Mailing list pgsql-hackers

From Pavan Deolasee
Subject Re: count(*) performance improvement ideas
Date
Msg-id 2e78013d0803120959r515667ecl4edb3bd3afbfbdfe@mail.gmail.com
Whole thread Raw
In response to Re: count(*) performance improvement ideas  (Mark Mielke <mark@mark.mielke.cc>)
Responses Re: count(*) performance improvement ideas
List pgsql-hackers
On Wed, Mar 12, 2008 at 9:53 PM, Mark Mielke <mark@mark.mielke.cc> wrote:
>
>
>
>  Fine - once per transaction instead of once per insert. Still, if there is
> overhead to this (updating a secondary summary table), does it really make
> sense to have it for every table? Most of my tables do not require count(*)
> on the whole table (actually - none of them do). For the same reason as I
> don't want oid, I don't think I would want "fast count" capabilities to
> impact my regular queries. Again, I don't think count(*) on the whole table
> is a particularly useful case. count(*) on particular subsets of the data
> may be, but of the whole table?
>

ISTM that you are complaining because we never had an *fast* count(*)
and adding that now comes at a cost. Had it been there from day one with
the same overhead as we are talking about now, nobody would have
complained :-)

Anyways, your point is taken and it would be great if can make it configurable,
if not table level then at least globally.


Thanks,
Pavan


-- 
Pavan Deolasee
EnterpriseDB http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Re: TODO-list on wiki (was: TODO update about SQLSTATE to PGconn)
Next
From: Alvaro Herrera
Date:
Subject: Re: Re: TODO-list on wiki (was: TODO update about SQLSTATE to PGconn)