3 ms·
The article isn't "demonizing" LIMIT/OFFSET. It's very clear about the use cases: > When to Use: Limit-offset > Applications with restricted pagination depth
by jakobegger 9y ago
The article isn't "demonizing" LIMIT/OFFSET. It's very clear about the use cases:
> When to Use: Limit-offset
> Applications with restricted pagination depth and tolerant of result inconsistencies.
I don't agree with your conclusion that result inconsistencies are "not a big deal" for most cases. It's a deliberate trade off. For example, I think it is annoying on Hacker News, but I understand why they chose to show inconsistent results (If I recall correctly, HN used to have consistent pagination using something similar to cursors, but they threw it out because it caused too much server load and it was annoying when sessions expired)
On the other hand, when my accountant goes through my expenses one by one to check if they have been booked correctly, I don't want him to miss lines due to inconsistent pagination.
Just because a technique is "time-honored", it doesn't mean it's "perfectly good" in every situation, or even in most situations. You always need to evaluate your techniques, no matter how common they are, to see if they work for your particular use case.
- combatentropy 9y agoThe article says it is "most perilous." Another comment mentioned another blog, http://use-the-index-luke.com/no-offset http://use-the-index-luke.com/no-offset, says to never use it. This is the syndrome I was getting at. An article attacks a shortcoming of an established way of doing things and then glosses over the deficiencies of its own alternative. The deficiencies of the original solution aren't a problem for most people, but the deficiencies of the new one are.