I have more questions based on this question and answer, which is now quite old but still seems to be accurate.
The suggestion of storing results in memory seems problematic in many scenarios.
- A web farm where the end-user isn't locked to a specific server.
- Very large result sets.
- Smaller result sets with many different users and queries.
I see a few ways of handling paging based on what I've read so far.
- Use
OFFSET
andLIMIT
at potentially high RU costs. - Use continuation tokens and caches with the scaling concerns.
- Save the continuation tokens themselves to go back to previous pages.
This can get complex since there may not be a one to one relationship between tokens and pages.
See Understanding Query Executions
In addition, there are other reasons that the query engine might need to split query results into multiple pages. These include:
- The container was throttled and there weren't available RUs to return more query results
- The query execution's response was too large
- The query execution's time was too long
- It was more efficient for the query engine to return results in additional executions
Are there any other, maybe newer options for paging?