flâneur — a map of the web's best reading

PostgreSQL: Re: Bitmap indexes etc.

postgresql.org · 473 words · saved by 1 readers

A plain indexscan fetches one tuple-pointer at a time from the index, and immediately visits that tuple in the table. A bitmap scan fetches all the tuple-pointers from the index in one go, sorts them using an in-memory "bitmap" data structure, and then visits the table tuples in physical tuple-location order. The bitmap scan improves locality of reference to the table at the cost of more bookkeeping overhead to manage the "bitmap" data structure --- and at the cost that the data is no longer retrieved in index order, which doesn't matter for your query but would matter if you said ORDER BY. > - what is "Recheck condition" and why is it needed? If the bitmap gets too large we convert it to "lossy" style, in which we only remember which pages contain matching tuples instead of remembering each tuple individually. When that happens, the table-visiting phase has to examine each tuple on the page and recheck the scan condition to see which tuples to return. > - why are proposed "width" f

PostgreSQL: Re: Bitmap indexes etc. Quick Links Community Contributors Mailing Lists IRC Local User Groups Events International Sites Re: Bitmap indexes etc. From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> To: Ivan Voras <ivoras(at)fer(dot)hr> Cc: pgsql-performance(at)postgresql(dot)org Subject: Re: Bitmap indexes etc. Date: 2005-12-26 21:57:11 Message-ID: 12553.1135634231@sss.pgh.pa.us Views: Whole Thread | Raw Message | Download mbox | Resend email Thread: 2005-12-26 21:32:13 from Ivan Voras <ivoras(at)fer(dot)hr> 2005-12-26 21:57:11 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> 2005-12

Explore this link on the map →

related reading