Re: Slow counting still true? - Mailing list pgsql-general

From Jeff Janes
Subject Re: Slow counting still true?
Date
Msg-id CAMkU=1zEHjhkqZZBBf=p982sd_z437Y50gkMMcp5nogj+guU_g@mail.gmail.com
Whole thread Raw
In response to Slow counting still true?  (Thomas Guettler <hv@tbz-pariv.de>)
List pgsql-general
On Mon, Sep 17, 2012 at 1:07 AM, Thomas Guettler <hv@tbz-pariv.de> wrote:
> Release 9.2 should increase count(*) performance. Is this wiki page still
> valid?

Even with index only scans, it still has to walk through every tuple,
even if they are only index tuples not table tuples.  So nothing has
fundamentally changed.  So it is still true that "PostgreSQL must walk
through all rows, in some sense".

I guess this sentence is partly out of date: "PostgreSQL will still
need to read the resulting rows to verify that they exist; other
database systems may only need to reference the index in this
situation."  Maybe just deleting it would be appropriate.

Cheers,

Jeff


pgsql-general by date:

Previous
From: Edson Richter
Date:
Subject: Re: Get time for each operation in "Explain..."
Next
From: Alex Lai
Date:
Subject: Re: Planner forces seq scan when select without quoting its values