Overview - Bitmap index scan behavior
What is it?
Bitmap index scan is a method PostgreSQL uses to find rows in a table by first scanning an index and creating a bitmap of matching row locations. Instead of fetching rows immediately, it collects all matching row positions and then fetches them in an efficient order. This helps speed up queries that match many rows but not all.
Why it matters
Without bitmap index scans, PostgreSQL might fetch rows one by one from the table, causing many slow random disk reads. Bitmap scans reduce disk access by grouping row fetches, making queries faster and more efficient, especially on large tables. This improves user experience and resource use in real applications.
Where it fits
Before learning bitmap index scans, you should understand basic indexes and sequential scans in PostgreSQL. After this, you can explore advanced query optimization, multi-index scans, and how PostgreSQL's planner chooses scan methods.