Recap: the other way


In the previous post we built offset pagination (?page=2). The server runs LIMIT 10 OFFSET 10. Simple, but it has two pains:


Deep pages are slow. OFFSET 1000000 makes the database walk and throw away a million rows.
New rows shift the pages. If someone inserts a row while...