Skip to content

Bitmap Indices

Bitmap Index

A bitmap index is a special kind of index designed for querying on multiple keys efficiently.

  • Records are assumed to be in numerically sequential form.
    • Given a number \(n\) it must be easy to retrieve the \(n\)'th record, especially if records are of fixed size
  • It's great for records that take on a relatively small number of distinct values

Storage Mechanism

A bitmap index is basically an inverted hash table on the row

income_level
L1
L2
L1
L4
L3

becomes

L1 - 10100
L2 - 01000
L3 - 00001
L4 - 00010
L5 - 00000

These can be great for applying boolean algebra on (e.g., select all people who have income level L1 or L2, etc.)