Blog91.5K views2,106 votes0 replies3,056 following
Paging Large Salesforce Data in Apex: Why OFFSET Fails and Keyset Pagination Wins
SOQL OFFSET degrades linearly per page and caps at 2,000 rows. Keyset pagination with an Id cursor keeps per-page cost flat — here's a working Apex implementation and its one critical requirement.