api-designdatabasessystem-design
Cursor pagination avoids some shifting
Anonymous
Offset pagination is simple, but rows inserted before the next page can shift results, causing repeats or gaps. Cursor pagination uses the last sort key as the next starting point; make the order deterministic with a unique tie-breaker, such as (created_at, id). Cursors reduce shifting, but a consistent snapshot still needs an explicit policy.
0