Plan nodes · Scans

Bitmap Index Scan

Collects the locations of matching rows from an index into a bitmap.

The first half of a bitmap scan: reads the index and builds an in-memory bitmap of the heap pages (and row positions) that match, without touching the table. Its parent, a Bitmap Heap Scan, then reads those pages in physical order. Bitmaps from several indexes can be combined with BitmapAnd and BitmapOr.

Example

SELECT * FROM tracks WHERE ms BETWEEN 100000 AND 101000

2 nodes

Run with EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF) on the sample database, PostgreSQL 19.0. Open it in the EXPLAIN visualizer →

Related

Seq Scan · Index Scan · Index Only Scan · Bitmap Heap Scan · BitmapAnd · BitmapOr · Tid Scan · Tid Range Scan · Sample Scan · Subquery Scan · Function Scan · Table Function Scan · Values Scan · CTE Scan · WorkTable Scan · Named Tuplestore Scan · Foreign Scan · Custom Scan