3 ms·
Even then, that does not work if new records are being inserted.
by sroussey 3mo ago
Even then, that does not work if new records are being inserted.
- maest 3mo agoYou handle this by paginating inside a transaction
- sroussey 3mo agoThat does not work for web apps, mobile, etc
- ndr 3mo agoUnless I grossly misunderstood your point, you're bound to see stale data. Such is the nature of distributed systems.
- sroussey 3mo agoYes, there is always a failure mode. But if do a search or have some result set, it is convenient to have paging work as close to expected as possible. Say you are processing/shipping orders. You do the first page and then advance to page 2. The very next order may no longer be the next order that would have shown depending on how many orders came in. In fact if order are coming in fast it will be impossible to page through a search result. But if you incorporate the last I’d seen you will get something closer to what the user expects. Naive offset won’t give you this.