4 ms·
What's the alternative? I hate pagination, nothing feels efficient to me. Fortunately, I've never worked on anything that required scale hehe..
by deburo 5y ago
What's the alternative?
I hate pagination, nothing feels efficient to me. Fortunately, I've never worked on anything that required scale hehe..
- taeric 5y agoI thought best practice was some form of key based pagination. If you must keep things in numbered pages and want to allow skipping to page x of y, then you are backed into a realized view that includes the page numbers in the data, at some level. You either build that on the fly every time you do a query, or you prebuild it. (Note, I'm not positive my thought here is accurate.)
- aarondf 5y agoCursor based pagination has advantages. You can actually skip records for other pages and you won't miss or duplicate records between pages. But the drawback is you can't have directly addressable pages. So it's just a tradeoff per app. Some apps do offset/limit and then simply limit the number of pages to something reasonable, which is a pretty viable solution too.