4 ms·
You probably assume they are talking about database cursors. The cursor is just a record ID in this article. There is no long term storage of database cursors o
by imbusy111 4y ago
You probably assume they are talking about database cursors. The cursor is just a record ID in this article. There is no long term storage of database cursors on the server. Assuming you can sort all your data, next query just returns all records after the given record ID, plus the record with that ID.
One corner case would be if the cursor record is deleted. I don't see it mentioned how they handle it.
- deleted 4y ago[deleted]
- erikpukinskis 4y agoDoes that mean you have to scan the entire results set to get the right page? So if I am on page 100, I have to query pages 1-99 and discard them? Or is there a trick here I’m missing?
- nerdponx 4y agoI think the point is that clients are not even given the option to think in terms of "page numbers". What's the use case for needing the 100th page of a query result, that also doesn't allow you to cache the 100th page locally to retrieve it later?
- imbusy111 4y agoThere are no pages anymore. You fetch a record by ID and next N records.
- erikpukinskis 4y agoRight, but in your database query doesn’t that require you to get a monster result set and filter it down in your application layer? There’s no SQL clause for “WHERE IT WOULD COME AFTER id=ah73d IN THE RESULT SET” as far as I’m aware.