Re: COUNT(*) and index-only scans - Mailing list pgsql-hackers

From Tom Lane
Subject Re: COUNT(*) and index-only scans
Date
Msg-id 17571.1321718882@sss.pgh.pa.us
Whole thread Raw
In response to Re: COUNT(*) and index-only scans  (Thom Brown <thom@linux.com>)
Responses Re: COUNT(*) and index-only scans
List pgsql-hackers
Thom Brown <thom@linux.com> writes:
> So is there a chance of getting bitmap index-only scans?

Don't hold your breath.  It seems like a huge increment of complexity
for probably very marginal gains.  The point of a bitmap scan (as
opposed to regular indexscan) is to reduce heap accesses by combining
visits to the same page; but it's not clear how useful that is if
you're not making heap accesses at all.

Robert's sketch of how this could work, full of don't-know-how-to-do-this
as it was, still managed to omit a whole lot of reasons why it wouldn't
work.  Notably the fact that the index AM API for bitmap scans is to
return a bitmap, not index-tuple data; and trying to do the latter would
break a lot of the performance advantages that exist now for bitmap
scans.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: EXPLAIN (plan off, rewrite off) for benchmarking
Next
From: Thom Brown
Date:
Subject: Re: COUNT(*) and index-only scans