Is my understanding of bitmap index scans and recheck cond correct?

From: AlexK987 <alex(dot)cue(dot)987(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Is my understanding of bitmap index scans and recheck cond correct?
Date: 2014-12-21 00:54:44
Message-ID: 1419123284194-5831616.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I think that when the query planner chooses to use an index to satisfy a
range scan, it verifies how the order of index keys is correlated with
physical order of rows in the table. If correlation is low, than the planner
wants to make sure that it reads each page only once.

So, first PG scans the range of index keys, and it determines which pages
store the matching rows. This step is called "bitmap index scan". Next, PG
reads all the rows on those pages and checks the range condition again. This
step is called "recheck cond".

Is that correct?

--
View this message in context: http://postgresql.nabble.com/Is-my-understanding-of-bitmap-index-scans-and-recheck-cond-correct-tp5831616.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andomar 2014-12-21 15:08:43 Re: Monitoring query plan cache
Previous Message AlexK987 2014-12-21 00:43:06 Re: Is clustering factor stored in pg_stats.correlation?