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

From Pavan Deolasee
Subject Re: count(*) performance improvement ideas
Date
Msg-id 2e78013d0803120852h11a1022fw952900d925405294@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:14 PM, Mark Mielke <mark@mark.mielke.cc> wrote:
>
>  If you are talking about automatically doing this for every table - I
>  have an objection that the performance impact seems unwarranted against
>  the gain. We are still talking about every insert or update updating
>  some counter table, with the only mitigating factor being that the
>  trigger would be coded deeper into PostgreSQL theoretically making it
>  cheaper?
>

No, I am not suggesting that. If you read proposal carefully, its one UPDATE
per transaction. With HOT, I am hoping that the counter table may be
completely cached in memory and won't bloat much.

Also, we can always have a GUC (like pgstats) to control the overhead.

Thanks,
Pavan


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


pgsql-hackers by date:

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