Offset pagination (page / size)
Built into the frameworkOpsLowRequest which page and how many items per page; the database skips the preceding rows and returns one page. The most intuitive way to paginate.
Best forAdmin tables and lists with modest data volume.
Avoid whenTables with millions of rows, feeds, and timelines that keep receiving new data.
ProsCan jump straight to page N, which suits tables with page numbers
Easy to implement with EF Core Skip/Take or SQL OFFSET/LIMIT
Easy for both frontend and backend to understand
ConsSlows down on deep pages because the database still has to count past all preceding rows
If data is added or removed between page turns, an item may repeat or be skipped
Requires a stable sort order, otherwise page results get shuffled
Cursor / keyset pagination
Hand-rolledOpen sourceOpsLowNo page numbers; instead remember the sort value of the last item on the previous page and continue from just after it, like a bookmark.
Best forFeeds, timelines, large tables, and public list endpoints.
Avoid whenThe product requires "jump to page N" or page number navigation.
ProsDeep pages stay just as fast, because the index jumps straight to the row
Rows inserted while paging do not cause duplicates or gaps
A good fit for a feed that keeps scrolling downward
ConsYou cannot jump to a chosen page, only to the previous or the next
The sort column needs an index, plus a unique column as a tiebreaker
Except for DRF you write it yourself, and cursors with several sort columns are easy to get wrong
Page numbers + total count
Built into the frameworkOpsLowOn top of offset pagination, also return "how many items and pages in total", so the UI can show "1234 in total" and a page bar.
Best forAdmin lists with small to medium data volume that need to show the total and page numbers.
Avoid whenLarge tables or feeds, where users do not care about the total.
ProsComplete user experience, with the total and the last page visible
Frontend pagination components are usually designed around this kind of data
Costs only one extra COUNT query over offset pagination
ConsCOUNT(*) is slow on large tables, and running it on every page turn wastes resources
The total and the list come from two queries, so data changing in between makes them disagree
On large tables the total often needs caching or estimation, adding complexity