Compare offset and cursor pagination cost across a large result set.
Offset pagination must count through every skipped row, so page 5,000 costs 5,000 times page one. Cursor pagination seeks on an indexed key and stays constant regardless of position. Offset pagination also skips or duplicates records when rows are inserted mid-traversal, so cursor pagination is more correct as well as faster.
REST Pagination
Offset scans offset + page size rows; cursor scans only page size rows
Offset scans offset + page size rows; cursor scans only page size rows Offset pagination must count through every skipped row, so page 5,000 costs 5,000 times page one. Cursor pagination seeks on an indexed key and stays constant regardless of position.
Offset pagination also skips or duplicates records when rows are inserted mid-traversal, so cursor pagination is more correct as well as faster.
This calculator takes 4 inputs: Total records, Page size, Cost per row scanned, Page number requested. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.