Hacker News new | past | comments | ask | show | jobs | submit login
Several ways to SQL pagination, including performance charts (use-the-index-luke.com)
22 points by fatalmind on March 16, 2012 | hide | past | favorite | 5 comments



It's true that this is the fastest way to handle pagination, but it can really fast become too ugly to code, since you have to do that manually, instead of just specifying offset and limit and let the DB engine to it.

On the other hands, approach Google takes seems more sensible to me, if you have more that some maximum number of results, just refuse to paginate further. Instruct the user to narrow down his query criteria instead. What could be the use for "go to page 1235 / 5433" if not for some kind of crawling database content?


Ouch... I wish people wouldn't vote up articles like this, which spread the content out over many pages just to push up the page views and ad revenue.

Supporting sites like this starves quality sites.


What? I've read through this site before (it's a great resource) and the whole thing is arranged out like a book. And like a good book, it has good flow from topic to topic that requires multiple pages of content.

I really don't think it is an advertising ploy, just a logic way to display long, structured content.


Not sure if this is really useful for anybody, but there is a single page version:

http://use-the-index-luke.com/book/export/html/12


I wish sites would always offer a single page version but the split up versions like this are more search friendly I think.




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

Search: