pagination - sergeyzolotukhin/learn-java-gradle GitHub Wiki
The only way to provide large datasets to clients is to use a paging mechanism
Offset method - In the offset method, the database counts up all rows until the desired row has been found.
The rows before the desired row are skipped
* limit-offset pagination can be inconsistent, Suppose a user moves from page n to n+1 while simultaneously a new element is inserted into page n
* the advantage of being stateless on the server.
Value based method - In this method, the next records are returned based on the last record of the previous page.
Instead of line numbers, the last row is used as an “offset” value.
client-side pagination
server-side pagination
Limit-offset
Cursors
* Cursors have the desirable property of pagination consistency on arbitrary queries, showing results as they exist at the time the transaction was started
* not scalable for too many clients
Keyset Pagination (Value based)
https://blog.novatec-gmbh.de/art-pagination-offset-vs-value-based-paging/
https://www.citusdata.com/blog/2016/03/30/five-ways-to-paginate/