Video lesson: Find the Data Access That Dominates Query Cost
Lesson promise
By the end, the learner should be able to explain the core model for find the data access that dominates query cost, apply it to a concrete input, and identify when its usual shortcut or guarantee stops applying. This is a recording brief; publish it as a playable lesson after the narration and visual sequence have been produced and reviewed.
Narration draft
Database performance depends on how many rows and pages a query touches, how much data moves between operators, and whether the working set fits in memory. An index can reduce search work, but the full execution plan and actual workload determine whether that reduction matters.
An index-only scan can avoid table lookups when the requested columns are present and visibility information permits it. A cache hit can avoid storage reads, yet an application cache may return stale data or consume substantial memory. Measure buffer reads and row counts alongside elapsed time.
Adding indexes indiscriminately slows writes and increases maintenance. Query plans can change as statistics and data distributions change. A fast isolated query may still overload the service when multiplied by high concurrency or an N+1 request pattern.
Visual sequence
- Put the input and assumptions on screen. Ask the learner to predict the next state before revealing it.
- Animate the representation and show the operation one transition at a time.
- Pause at the boundary case in the companion article and compare the result with the invariant.
- End with the exercise prompt: An endpoint issues one query for a list and then one query for each item. Estimate query count for 80 items and describe how batching changes network round trips and result cardinality.
Companion material
Use the article, trace, and interactive concept flow as the learner’s written and visual references. The video remains planned until an actual playable media URL and reviewed transcript are available.
Related articles
Find the Data Access That Dominates Query Cost
Database performance depends on how many rows and pages a query touches, how much data moves between operators, and whether the working set fits in memory.
Latency, Throughput, and the Cost of Coordination
Every system design trade-off is ultimately a balance between doing work fast, doing work often, and paying the cost of making multiple components agree.
What Is a Software System?
A system is not a single program — it is components with boundaries, responsibilities, and failure modes. Learn how to see the box before you design inside it.
New lessons by email
Get new articles and notes on the systems behind everyday software.
One technical dispatch per week. No noise.
Not started
Sign in to save your learning progress.