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.