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

From Tom Lane
Subject Re: count(*) performance improvement ideas
Date
Msg-id 20927.1205895835@sss.pgh.pa.us
Whole thread Raw
In response to Re: count(*) performance improvement ideas  ("Stephen Denne" <Stephen.Denne@datamail.co.nz>)
Responses Re: count(*) performance improvement ideas
List pgsql-hackers
"Stephen Denne" <Stephen.Denne@datamail.co.nz> writes:
> What I was asking about with those questions, is if a single row is inserted in transaction A, and updated 1000 times
stillwithin transaction A, then transaction A commits... does a single row version get written, or 1001, 1000 of which
areremovable?
 

Umm ... AFAICS there is no need for an UPDATE to touch the count table
at all.  You'd only need ON INSERT and ON DELETE triggers.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: count(*) performance improvement ideas
Next
From: Tom Lane
Date:
Subject: Re: timestamp datatype cleanup