4 ms·
Doesn't that strategy only work when you're paginating one page at a time, like Reddit? How would you implement a deep pagination like "go to page 107" unless
by always_good 9y ago
Doesn't that strategy only work when you're paginating one page at a time, like Reddit?
How would you implement a deep pagination like "go to page 107" unless you can derive page 107 from your order criteria?
- wutwutwutwut 9y agoThis is true. It depends on application but I wonder how often users really need to go to Page 107 of something. Seems like maybe this use case should be solved with some kind of search instead. I have implemented offset pagination myself to several apps where being able to paginate by jumping to the page with records starting with "R" would make more sense.
- flukus 9y agoIn most cases this is probably better, but sometimes there is no logical filter that works on you hvae to rely on sort order. One example might be a gallery, I might decide to look though pages 1-10 tonight, 20-30 tomorrow, etc. An arbitrary primary key is the only discriminator that makes sense here. Another example would be classical forum posts, they are sorted by last active but sometimes I'll want to jump to page 134 because that's where I got up to last time and bookmarked my place. That said, if users were doing this in my software I'd definitely be looking at how I can improve their workflow.
- stubish 9y agoWe have this on one of our web apps, and it is a problem. To me the problem is why do we allow jumping to page 107 of 736 in the first place? How does this help someone? The two use cases are 1) user is manually performing a binary search on the results, 2) a bot needs to index the site. Both of these use cases are better solved in other ways, with either search forms that do not suck or index pages generated specifically for crawlers. So the answer to 'how would you implement a deep pagination like "go to page 107"' is to not implement that, and instead improve your design.
- kuschku 9y agoAnd that’s why Google’s pagination on search results is broken, and why so much usability was lost. Sometimes I want the lowest ranked results for a query, or the middle-of-the-field results. Let me have them.
- gruez 9y ago>Sometimes I want the lowest ranked results for a query, or the middle-of-the-field results. What's the use case for that?
- kuschku 9y agoGoogle results are gamed so much, that often personal blogs that don’t do SEO, but offer interesting content, appear beyond page 5 of Google search results, but are still relevant. Similar issues appear in many situations where search is used on third party results, but even on first-party results the first page is often gamed. I’ve been thinking about it, and ideally one would make a search engine that only indexes pages that have no analytics, tracking, ads, paywalls, etc. Then I’d find those same pages I’m searching for. To give an example: I found http://blog.deconinck.info/post/2016/12/19/A-Dirt-Cheap-F-Awesome-Led-Table http://blog.deconinck.info/post/2016/12/19/A-Dirt-Cheap-F-Aw... on page 3 of Google for "raspberry pi led", just below https://tech.scargill.net/home-control-2016/ https://tech.scargill.net/home-control-2016/ (both of which are interesting IMO)
- slobotron 9y agoIt's a first result if you search for "raspberry pi led table"...
- kuschku 9y agoYes, but I wasn't looking about tables. Just general things to do with led strips and raspberry pis. Google is great for finding things you already know, but I'm using it for discovering things I didn't even know I was interested in. I can't exactly just put the entire dictionary into google to try and find what I might like. I enter a category I might like, and look through the results matching that category.
- masklinn 9y agoFirst, you should consider whether you actually need that. Also note that it's not just reddit, HN uses the same system. Second, you can just perform an indirection through offset (+ limit = 1).
- grogers 9y agoWhen you are jumping large numbers of pages, you usually don't care about exact page boundaries. For example, you could have a background process that slowly paginates through the table and saves off the page boundaries, which you can then use for jumping into. They will always be a bit off especially near the middle of the table, but that's probably okay. There's lots of ways to do this fuzzy jumping that don't involve scanning the full table synchronously.
- awj 9y ago> How would you implement a deep pagination like "go to page 107" You wouldn't. Keyset pagination forces the user to do the exact same thing people complain about you doing to the database. Want page 10 of results? Too bad, enjoy running through pages 1-9 and throwing them away. Except now everything is even slower because it's users talking to the service, not the service talking to the db. There are plenty of use cases where that's a perfectly acceptable trade-off, or an annoying-but-necessary trade-off, but the people all up in a froth over the inefficiency of limit/offset seem to regularly fail to realize that they're advocating for a database performance solution with implications that reach all the way out to the UI/UX level. At a minimum, I see very little in the way of acknowledgement of this factor.