Re: Improving count(*) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Improving count(*)
Date
Msg-id 20234.1132267039@sss.pgh.pa.us
Whole thread Raw
In response to Re: Improving count(*)  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-hackers
Martijn van Oosterhout <kleptog@svana.org> writes:
> Now, lets say you add a field to the tuple which you the position of
> the index entry. You can only reasonably do this for one index, say the
> primary key. Now you have a two-way link the updating becomes much
> quicker, at the cost of even more overhead.

I think this is fairly infeasible --- consider what it does to the cost
and (lack of) atomicity of an index page split, for instance.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: Improving count(*)
Next
From: Andrew Dunstan
Date:
Subject: Re: Optional postgres database not so optional in 8.1