Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is pagination so resource-expensive?

It's one of those things that seems to have an odd curve where the more I think about it, the more it makes sense. To a certain extent, of course. And then it doesn't make sense to me at all.

Care to enlighten me?

like image 455
btw Avatar asked Aug 27 '08 05:08

btw


1 Answers

Because in most cases you've got to sort your results first. For example, when you search on Google, you can view only up to 100 pages of results. They don't bother sorting by page-rank beyond 1000 websites for given keyword (or combination of keywords).

Pagination is fast. Sorting is slow.

like image 113
lubos hasko Avatar answered Sep 18 '22 16:09

lubos hasko