All Questions
Database Indexing medium

You query `WHERE Age=30 AND Status='Active'`. You have separate indexes on `Age` and `Status`. Why is this often slower than a single composite index `(Age, Status)`?

  1. A Relational databases are fundamentally unable to utilize more than one index per query, making the redundant index a waste of resources.
  2. B The database must perform two independent B-Tree traversals and then merge the resulting pointer lists using expensive CPU-bound computations.
  3. C Maintaining two separate indexes on the same table significantly increases the risk of 'Deadlock' errors during high-concurrency write operations.
  4. D Composite indexes utilize specialized Hash Map architectures that offer significantly better spatial locality than standard single-column B-Trees.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions