Exercise 2: Why "Add the Missing Index" Is the Wrong Place to Stop — Possible Solution ==================================================================== THE 5-WHYS CHAIN, PER THIS CHAPTER ------------------------------ Why did checkout fail? A query ran forever. Why did it run forever? It scanned the whole table. Why did it scan the whole table? No index existed on the filtered column. Why wasn't there an index? "The schema-review process for new queries doesn't currently check for this." WHY "ADD THE MISSING INDEX" ONLY ADDRESSES THE PROXIMATE TRIGGER ------------------------------ Per this chapter, the proximate trigger is "the immediate, final action that set the incident off" - in this case, the specific unindexed query. Adding the index fixes that one specific query, resolving today's specific incident, but it doesn't touch the process that allowed an unindexed query to reach production in the first place. THE ACTUAL ROOT CAUSE ------------------------------ Per this chapter, "that last answer - a missing schema-review check - is the actual root cause worth fixing." The systemic gap is that nothing in the current process checks new queries for missing indexes before they ship - a condition that will produce the exact same class of incident again with the next unreviewed query, regardless of today's specific index being added. WHY THE DISTINCTION MATTERS PRACTICALLY ------------------------------ Per this chapter, "'add the missing index' fixes today's incident; it does nothing for the next query that reaches production the exact same way." Stopping at the proximate trigger produces a review that looks complete but leaves the actual systemic vulnerability untouched - exactly the failure mode a genuinely useful review is supposed to avoid. WHY THIS WORKS AS AN ANSWER ------------------------------ It walks through the actual 5-whys chain from the chapter, correctly distinguishes the proximate trigger from the root cause, and explains specifically why stopping at the trigger leaves the recurring vulnerability unaddressed.