Large offsets force the database to scan and discard rows.
Daily micro-tips for C#, SQL, performance, and scalable backend engineering.
Large offsets force the database to scan and discard rows.
SELECT * FROM Orders WHERE Id > @LastSeenId ORDER BY Id FETCH NEXT 20 ROWS ONLY;
Why this works
Keyset pagination scales infinitely.