Operator

Bitmap Heap Scan

PostgreSQL builds a bitmap of matching tuple IDs from one or more indexes, then visits the heap pages once each.

A Bitmap Heap Scan is a two-step plan. First, a Bitmap Index Scan walks one or more indexes and produces a bitmap of matching tuple IDs. Then, the Bitmap Heap Scan visits each affected heap page exactly once, in physical order, and rechecks the predicate.

This is the planner's choice when an Index Scan would visit too many random heap pages but a Seq Scan would read more rows than necessary. It also lets PostgreSQL combine multiple indexes (with BitmapAnd / BitmapOr) for predicates over different columns.

It shows up frequently for medium-selectivity queries on large tables and for full-text and array searches backed by GIN indexes.