core practice · system design prompt

Design exercise: Query Execution & Optimization

Logical and physical plans, cardinality estimation, join ordering, indexes, vectorized execution, and spilling. Implement designOutline() returning non-empty values for: logicalPlan, costModel, physicalExecution. Each value must name a concrete mechanism or decision.

The mechanism

A query optimizer searches physical plans using imperfect estimates. Execution quality depends on access paths, join order, memory budgets, and fallback under estimation error.

Study Query Execution & Optimization

Expected evidence

A design outline with logicalPlan, costModel, physicalExecution plus an explicit failure mode or trade-off.

Try this drill in the practice workspace →

Hints when you need them
  • Name the failure mode before selecting the mechanism.

Check the sources

Browse all practice briefs