SD-11 · GUIDED WORKSHEET
Make the query path visible
Choose an index for a learner-submission history query.
Read. Try. Defend.
Companion to the Buildfest System Design guides.
Your practice brief
- Write a query filtered by user and collection, ordered by created_at and id.
- Propose an index and state why its key order matches the query.
- Describe the dataset and measurements needed to validate it, including the added write cost.
Your response stays in this tab. Download it before leaving. This self-guided worksheet is not graded or saved to your account.
Reveal reasoning after attempting
The leading keys should match the useful equality filters before the ordering keys in this example. The exact best index still depends on the database, predicates and workload. A proposed index is a hypothesis until a plan and representative measurement support it.
Other approaches can be valid. Check your assumptions, correctness, failure handling and trade-offs.
