The Data Layer
Database architecture as the role describes it: indexing and query patterns first, then the Rust side — pools, transactions and prepared statements.
// lessons
- 01
Index Scan vs Seq Scan: Rows Examined
Count rows examined for both plans and say which one the numbers favour.
- 02
Composite Indexes & the Leftmost Prefix
Say which predicate sets a composite index can serve, and which it only filters.
- 03
The Cost Model Behind EXPLAIN
Price an index scan against a seq scan and predict the planner's choice.
- 04
Cursor Pagination vs OFFSET
Replace OFFSET with a keyset cursor and quantify what it saves.
- 05
Isolation Levels & the Anomalies They Permit
Name which anomaly each isolation level permits, and prove it with a trace.
- 06
Transactions, Rollback & Prepared Statements
Implement commit and rollback, and say what a prepared statement actually reuses.
- 07
Connection Pools & Where Latency Goes
Read queue wait out of a pool simulation and size a pool for a reason.
Every exercise compiles and runs in the Forge sandbox — standard library only, no external crates.
