Code Room
On-callHardoc-g428
Subject Index corruptionLevel Senior–Staff~40 minCommon in Databases & SQL interviewsIndustries Technology, IT services

Question

After your platform team upgraded the host OS on the database fleet (a major distro bump), a few queries start returning wrong results: a `WHERE email = ?` lookup misses rows that you can plainly see exist when you `SELECT` with a sequential scan, and a `UNIQUE` constraint let in what looks like a duplicate. No app or schema change. The tables are fine; only certain text/index lookups misbehave. `amcheck` on one btree index reports inconsistencies. Triage, mitigate, and prevent recurrence.

What a strong answer looks like

Stop the bleeding first (mitigate), then form hypotheses from real signals. Separate root cause from symptom, communicate status as you go, and close with what prevents a repeat.

Diagram & narrate the incident
Loading whiteboard…
Run or narrate your approach, then ask the coach.