2 ms·
Include the last id (which should be indexed) of the previous page in the next where filter. https://use-the-index-luke.com/sql/partial-results/fetch-next-page
by eatonphil 3y ago
Include the last id (which should be indexed) of the previous page in the next where filter.
https://use-the-index-luke.com/sql/partial-results/fetch-next-page https://use-the-index-luke.com/sql/partial-results/fetch-nex...
- adra 3y agoThat's pagination, not indexed page scanning. Both have their place but they're not the same. Pagination is way better to handle updates between page loads and generally more complicated to implement. As you're now doing head tail index cursor tracking. Flat boring offset/limit is amazingly simple for the happy lazy path which is probably fine for most apps.