Database Indexing medium
Bitmap Indexes are highly efficient for low-cardinality columns (e.g., Gender, State). Why are they avoided in OLTP (Transactional) systems?
- A They consume significantly more read-bandwidth than B-Trees because the data must be decompressed from several disparate sectors before every query.
- B The highly compressed nature of bitmaps means that updating a single record requires locking an entire segment, severely bottlenecking write concurrency.
- C They are fundamentally limited by the underlying hardware architecture to only handle 32-bit integer identifiers, making them unsuitable for modern Big Data.
- D They provide exceptional performance for 'AND' logic but are mathematically incapable of resolving 'OR' or 'NOT' query predicates in a single pass.
Answer: B. The highly compressed nature of bitmaps means that updating a single record requires locking an entire segment, severely bottlenecking write concurrency.
Bitmap indexes are incredibly efficient for low-cardinality data and data warehousing (OLAP) where queries are complex but rarely update existing data. However, in a transactional system (OLTP), updates are frequent. Because bitmap data is tightly compressed into blocks (segments), changing one bit often requires locking and rewriting the entire segment (thousands of rows). This leads to massive concurrency contention, where multiple users are forced to wait for a single update to finish.
One system design question a day, with spaced repetition so the ones you miss come back.
Get the appRelated questions
- Z-Order Curves (Geohashing) map 2D data to 1D strings for indexing. What is their primary weakness?
- In-Memory databases (Hyper, HANA) often favor Adaptive Radix Trees (ART). Why?
- Log-Structured Merge (LSM) Trees (RocksDB, Cassandra) optimize for Write Throughput. How does their disk IO pattern differ from B-Trees?
- In LSM compaction strategies, 'Universal' (Tiered) compaction prioritizes what over 'Leveled' compaction?
- In LSM trees, what is 'Space Amplification'?
- Why is it generally ineffective to index a 'Low Cardinality' column like `Gender` ('Male'/'Female')?