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

Started by AlexK987over 11 years ago2 messagesgeneral
Jump to latest
#1AlexK987
alex.cue.987@gmail.com

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.

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#2AlexK987
alex.cue.987@gmail.com
In reply to: AlexK987 (#1)
Re: Is my understanding of bitmap index scans and recheck cond correct?

I found the answer here:

http://www.postgresql.org/docs/current/interactive/using-explain.html

Thanks!

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

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general