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 took 193.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 page retrievals 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 ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend