Re: COUNT(*) and index-only scans

From: Greg Stark <stark(at)mit(dot)edu>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: COUNT(*) and index-only scans
Date: 2011-10-10 17:35:17
Message-ID: CAM-w4HOBfxNcexc+gyhUe4LSYLeSsnPrtZsn3KcTaeK8h7Tq2A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Oct 10, 2011 at 6:23 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> I talked to Robert Haas and he said that index-only scans do not
> optimize COUNT(*).  Is this something we can do for PG 9.2?  Is anyone
> working on this?

People usually conflate multiple problems when they talk about
"count(*). The usual case people are concerned about would require
materialized views, not index-only scans.

--
greg

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2011-10-10 17:36:26 Re: COUNT(*) and index-only scans
Previous Message Thom Brown 2011-10-10 17:34:02 Re: COUNT(*) and index-only scans