Re: BitMap Heap Scan & BitMap Index Scan

Поиск
Список
Период
Сортировка
От Torsten Förtsch
Тема Re: BitMap Heap Scan & BitMap Index Scan
Дата
Msg-id 5283486A.7000209@gmx.net
обсуждение исходный текст
Ответ на BitMap Heap Scan & BitMap Index Scan  (monalee_dba <monalee@sungraceinfotech.co.in>)
Список pgsql-performance
On 10/11/13 08:32, monalee_dba wrote:
> I would like to know, What is BitMap Heap Scan & BitMap Index Scan? When
> I use EXPLAIN for query, which has LEFT JOIN with 4 different table then
> some time query planner uses Bitmap Heap Scan and some time Bitmap Index
> Scan?

Check out this great presentation:

  http://momjian.us/main/writings/pgsql/optimizer.pdf

The way I understand it is this (Correct me if I am wrong). The bitmap
index scan uses an index to build a bitmap where each bit corresponds to
a data buffer (8k). Since a buffer can contain multiple tuples and not
all of them must match the condition another run over the heap pages is
needed to find the matching tuples. This is the bitmap heap scan. It
iterates over the table data buffers found in the bitmap index scan and
selects only those tuples that match the filter (hence the recheck thing
you see in explain) and visibility conditions.

Torsten


В списке pgsql-performance по дате отправления:

Предыдущее
От: Albe Laurenz
Дата:
Сообщение: Re: Order By Clause, Slows Query Performance?
Следующее
От: Marc Mamin
Дата:
Сообщение: CREATE TABLE AS WITH FREEZE ?