Re: Bitmap Index Scan optimization opportunity - Mailing list pgsql-performance

From Heikki Linnakangas
Subject Re: Bitmap Index Scan optimization opportunity
Date
Msg-id 46BCC4F9.70903@enterprisedb.com
Whole thread Raw
In response to Bitmap Index Scan optimization opportunity  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-performance
Kevin Grittner wrote:
> These query times are the "fully cached" times for both, from doing a previous run of the same query.  (The first one
took193.772 ms on its first run; I don't have a good "uncached" timing for the second one at this point.) 
>
> It seems like the first query could move the searchName filter to the Bitmap Index Scan phase, and save 97.5% of the
pageretrievals in the Bitmap Heap Scan. 

Yes it could in theory, but unfortunately the planner/executor doesn't
have the capability to do that. An indexed value is never handed back
from the index; the indexed values are only used to satisfy index
conditions, not filters. It's been discussed before (see
http://archives.postgresql.org/pgsql-performance/2006-09/msg00080.php),
but it's not easy to implement so no one's done it yet.

--
  Heikki Linnakangas
  EnterpriseDB   http://www.enterprisedb.com

pgsql-performance by date:

Previous
From: "Simon Riggs"
Date:
Subject: Re: CLOG Patch
Next
From: "Merlin Moncure"
Date:
Subject: Re: Dell Hardware Recommendations