Skip to main content

Module 2: Storage Engines & Indexing: Mistake Clinic

This clinic turns wrong moves into reusable judgment. Use it after each practice page and again before the quiz or checkpoint.


Module-Specific Mistake Radar

Start with these traps. Replace or extend them with real mistakes from your own work.

Mistake to look forWhere it shows upSymptomRepair evidence
Finishing Storage Engine Foundations Lab with only a final answerStorage Engine Foundations LabThe work has no failed case, trace, test, proof gap, or design stress point.Add the smallest broken example and show the repair that changes the result.
Finishing Index Selection and Access Path Workshop with only a final answerIndex Selection and Access Path WorkshopThe work has no failed case, trace, test, proof gap, or design stress point.Add the smallest broken example and show the repair that changes the result.
Finishing Query Planning and Concurrency Clinic with only a final answerQuery Planning and Concurrency ClinicThe work has no failed case, trace, test, proof gap, or design stress point.Add the smallest broken example and show the repair that changes the result.
Finishing Code Katas with only a final answerCode KatasThe work has no failed case, trace, test, proof gap, or design stress point.Add the smallest broken example and show the repair that changes the result.
Treating Why Databases Care About Disk: Random vs Sequential I/O as vocabulary instead of a toolWhy Databases Care About Disk: Random vs Sequential I/OThe explanation names the concept but cannot decide between two cases.Write one example, one non-example, and the rule that separates them.
Treating Pages, Records, Heap Files, Slotted Pages as vocabulary instead of a toolPages, Records, Heap Files, Slotted PagesThe explanation names the concept but cannot decide between two cases.Write one example, one non-example, and the rule that separates them.

Practice Mistake Checks

Pull any miss from these checks into your mistake log.

Storage Engine Foundations Lab

Source: practice/01-storage-engine-foundations-lab.md

For each statement, identify the error:

  1. "SSDs eliminate the random-vs-sequential distinction."
  2. "A full table scan on a cold database touches N random pages, where N is the number of rows."
  3. "When a row is deleted, the slot is reused immediately for the next insert."
  4. "A buffer pool hit is free."
  5. "LRU is the best replacement policy for any workload."

Index Selection and Access Path Workshop

Source: practice/02-index-selection-and-access-path-workshop.md

For each statement, identify the error:

  1. "A secondary index always reduces I/O."
  2. "An LSM-tree has no random I/O."
  3. "A Bloom filter can give false negatives."
  4. "All indexes help range scans."
  5. "Adding more indexes only costs disk space, not write performance."
  6. "Bitmap indexes are best for high-cardinality columns."

Query Planning and Concurrency Clinic

Source: practice/03-query-planning-and-concurrency-clinic.md

For each statement, identify the error:

  1. "JIT always beats volcano execution."
  2. "Hash join is always faster than nested loop for large inputs."
  3. "Histograms are only needed for non-uniform distributions; otherwise NDV is enough."
  4. "Under MVCC, readers and writers never interact."
  5. "Snapshot isolation is serializable."
  6. "WAL doubles storage write cost; sequentiality makes it worse, not better."

Repair Protocol

For each real mistake:

  1. Reproduce the failure on the smallest example, trace, proof, query, command, or design sketch.
  2. Name the hidden assumption.
  3. Repair the artifact.
  4. Save evidence that changed: failing then passing test, corrected proof step, revised diagram, safer command, benchmark, or review note.
  5. Add one retrieval card beginning with Check... before... or Do not use... when....

Mistake Log

DateMistakeSymptomRoot causeRepair evidenceRetrieval card
StarterPick one radar row aboveExplain how it would fail in this moduleName the assumptionAdd a counterexample or corrected artifactWrite the card before closing the page

Completion Standard

  • At least five real mistakes are logged.
  • At least two mistakes include a counterexample or failing test.
  • At least one mistake connects to an older semester skill.
  • At least one correction changes code, a proof, a diagram, a command transcript, a query, or a design decision.