Source code Performance Cost Stability

Unbounded query / no pagination

Part of the Scalability antipatterns check · fix arrives as a pull request

What it is

A query fetches an entire table or an unbounded result set with no LIMIT and no pagination.

Why it matters

The query gets slower and heavier every day the table grows, and it fails all at once rather than degrading — one day the result no longer fits in memory and the endpoint starts erroring for everyone.

How to fix it

Add a limit with a sensible default and expose cursor-based pagination to callers. Cursors hold up better than offsets, which get slower the deeper the page and can skip or repeat rows as data changes underneath.

Run them all on your app

Connect your repo and your live services with read-only scopes. The first scan is free, and nothing changes without your approval.