Comparisons

Ten pairs that get conflated in real conversations. Neither column wins — what decides is the requirement. Each record leads with the confusion, because the confusion is the reason the record exists.

Offset vs Cursor pagination

What people get wrong about this pair

Offset pagination is thought of as merely slower at high offsets. The worse problem is correctness: with rows being inserted or deleted between requests, a client walking pages will silently skip and repeat records, and no amount of indexing fixes that.

Offset / limit
Use it when

Small, stable datasets where jumping to an arbitrary page is a real requirement — admin tables, short lists.

Cursor (keyset) pagination
Use it when

Large or actively changing datasets, infinite scroll, and any API a machine will walk end to end.

DimensionOffset / limitCursor (keyset) pagination
Cost of deep pagesServer scans and discards the skipped rowsSeeks directly using the index
Stability under writesItems shift between pagesStable — anchored to a real row
Jump to page NYesNo — next and previous only
Total countNatural to provideUsually a separate, often approximate query
RequiresAn ORDER BYA stable, unique sort key (often a tiebreaker column)
Client contractSimple, familiarOpaque token the client must not construct itself