3 ms·
Except that the technical limitations favor correct pagination — it's perfectly cacheable unlike the idiotic model: http://www.dehora.net/journal/2008/07/20/eff
by blasdel 16y ago
Except that the technical limitations favor correct pagination — it's perfectly cacheable unlike the idiotic model: http://www.dehora.net/journal/2008/07/20/efficient-api-paging-count-down-not-up/ http://www.dehora.net/journal/2008/07/20/efficient-api-pagin...
I think the true reason is really just pervasive ignorance — everybody royally fucks this up and doesn't question it for a second.
If you have N items with M on each page, and the same request for 'page 2' always returns items N-M through N-2M, with the contents shuffling off the end as N increases, you're an abject failure. SELECT … LIMIT M OFFSET N-(P-1)•M is in almost every single web app and totally bullshit. It's incredibly depressing, but we'll probably be stuck with it for at least the rest of our lifetimes.