nrml
DatabasesPro problem

Collapse the Order Report Query Storm

Replace a per-row lookup with one batched load without changing the report output.

The scenario

Replace a per-row lookup with one batched load without changing the report output.

A failure to reason about

A report is correct for three orders but sends a separate related-data query for every row as the report grows.

Illustrative context for the topic. The exercise’s full requirements arrive in the workspace.

Questions to bring to your review

  • Which caller makes the reported behavior visible?
  • What focused regression would distinguish the current behavior from the requirement?
  • What existing behavior must remain intact after the change?

Skills you will practice

  • Query batching
  • Data access
  • Performance

Read the existing code, reproduce the reported behavior, review proposed changes, and verify your final implementation. You can use AI assistance while staying responsible for the result.

Prepare with a worked example

See how nrml evaluates an attempt, including the limits of automated evidence.