Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Do Not Use Offset for pagination (2014) (use-the-index-luke.com)
6 points by porsager on Dec 16, 2020 | hide | past | favorite | 2 comments


Don’t agree. The alternative suggested is much more complicated. In real life very few people go deep into the further pages of a table, so offset is just fine most of the time, so just do that and only do the more complicated thing if it becomes obvious that you need to (probably never).


It’s worth avoiding because it’ll start causing problems for your biggest customers first with no warning, and user-facing timeouts provoke users to heavily retry exactly those shard-crushing queries you most wish they wouldn’t.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: