Bits Per Value
A bitmap index represents each distinct value of a column as a bit vector with one bit per row. The bit is set when that row holds the value. A column with four distinct values produces four bitmaps, each as long as the table.
Why It Excels At Low Cardinality
Bitmaps shine on low cardinality columns like region, gender, or status. With few distinct values the index stays compact, and modern compression schemes shrink long runs of zeros dramatically.
The real strength is combining predicates. Filtering on region equals west AND status equals active becomes a bitwise AND of two bitmaps, a hardware speed operation that yields the matching rows directly. OR and NOT map to bitwise OR and complement.
The Write Cost
Bitmap indexes are weak for high write workloads. Updating a single row may require modifying multiple bitmaps, and locking tends to be coarse, blocking concurrent writers. They are therefore a staple of read mostly analytic warehouses, not transactional systems.
Key idea
A bitmap index stores one bit vector per distinct value, making boolean predicate combining a bitwise operation, ideal for low cardinality read mostly analytic columns.