There are two primary ways to paginate in MySQL: offset/limit and cursors. If you sort your rows by a column that is not unique, MySQL gets to decide which order to return these rows in. The easiest way to produce deterministic ordering is to order by a unique column because every value will be distinct.
Table of contents
The importance of deterministic ordering #Offset/limit pagination #Cursor pagination #Conclusion #Want a powerful and performant MySQL database that doesn’t slow you down?4 Comments
Sort: