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 for | Where it shows up | Symptom | Repair evidence |
|---|---|---|---|
| Finishing Storage Engine Foundations Lab with only a final answer | Storage Engine Foundations Lab | The 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 answer | Index Selection and Access Path Workshop | The 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 answer | Query Planning and Concurrency Clinic | The 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 answer | Code Katas | The 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 tool | Why Databases Care About Disk: Random vs Sequential I/O | The 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 tool | Pages, Records, Heap Files, Slotted Pages | The 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:
- "SSDs eliminate the random-vs-sequential distinction."
- "A full table scan on a cold database touches
Nrandom pages, whereNis the number of rows." - "When a row is deleted, the slot is reused immediately for the next insert."
- "A buffer pool hit is free."
- "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:
- "A secondary index always reduces I/O."
- "An LSM-tree has no random I/O."
- "A Bloom filter can give false negatives."
- "All indexes help range scans."
- "Adding more indexes only costs disk space, not write performance."
- "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:
- "JIT always beats volcano execution."
- "Hash join is always faster than nested loop for large inputs."
- "Histograms are only needed for non-uniform distributions; otherwise NDV is enough."
- "Under MVCC, readers and writers never interact."
- "Snapshot isolation is serializable."
- "WAL doubles storage write cost; sequentiality makes it worse, not better."
Repair Protocol
For each real mistake:
- Reproduce the failure on the smallest example, trace, proof, query, command, or design sketch.
- Name the hidden assumption.
- Repair the artifact.
- Save evidence that changed: failing then passing test, corrected proof step, revised diagram, safer command, benchmark, or review note.
- Add one retrieval card beginning with Check... before... or Do not use... when....
Mistake Log
| Date | Mistake | Symptom | Root cause | Repair evidence | Retrieval card |
|---|---|---|---|---|---|
| Starter | Pick one radar row above | Explain how it would fail in this module | Name the assumption | Add a counterexample or corrected artifact | Write 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.