CS FundamentalsModerateTCS NQT · Infosys pattern

Why does adding an index on a frequently-UPDATEd or frequently-INSERTed column have a real cost, beyond the storage the index itself uses?

  1. A. It only slows down SELECT queries, never writes
  2. B. It prevents the column from ever being updated again
  3. C. It has no real cost; indexes only ever help
  4. D. Every INSERT/UPDATE/DELETE that touches the indexed column must also update the index structure (potentially splitting/merging B+ tree nodes), slowing down writes in exchange for faster reads

Correct answer: D. Every INSERT/UPDATE/DELETE that touches the indexed column must also update the index structure (potentially splitting/merging B+ tree nodes), slowing down writes in exchange for faster reads

Indexes are maintained incrementally: every write that changes an indexed column's value must also locate and update the index (possibly triggering node splits or merges in a B+ tree), so more indexes on a table mean slower writes — the classic read/write trade-off behind index design.

More DBMS and SQL questions

Exams that ask this topic