CS FundamentalsHardGATE CS · DBMS

A bitmap index is built on an attribute with 4 distinct values over a table of 1,000,000 rows (uncompressed, one bit per row per value). What is the total size of the bitmaps?

  1. A. 125,000 bytes (1,000,000 bits)
  2. B. 500,000 bytes (4,000,000 bits)
  3. C. 4,000,000 bytes
  4. D. 250,000 bytes (2,000,000 bits)

Correct answer: B. 500,000 bytes (4,000,000 bits)

There is one bitmap per distinct value, each with one bit per row: 4 × 1,000,000 = 4,000,000 bits = 500,000 bytes. Using 2 bits per row (log₂ 4) is an encoded index, not a bitmap index.

More DBMS and SQL questions

Exams that ask this topic