jargon

Comparison

N+1 queryvsRequest waterfall

N+1 query

you fetch a list of fifty orders and then the ORM quietly issues fifty more queries, one per order, to load the customer.

A pattern where fetching a collection triggers one additional query per element, usually via lazy-loaded ORM associations. Latency scales with result size instead of staying flat, so the endpoint is fine in development with three rows and terrible in production with three hundred. The fix is an eager load, a join, or a batched second query.

Full entry →

Request waterfall

the second request could not start until the first finished, because the component that made it had not rendered yet.

Requests that run in sequence when they could have run in parallel, usually because a child component only mounts after its parent's data arrives. Each level adds a full round trip, so a three-deep component tree turns a 100ms API into a 300ms page. The fixes are hoisting the fetches, preloading at the route level, or letting the server render the whole tree at once.

Full entry →

Related comparisons