Why You Shouldn’t Use OFFSET and LIMIT For Your Pagination

https://programming.dev/post/7302978

Why You Shouldn’t Use OFFSET and LIMIT For Your Pagination - programming.dev

Paywall.

ivopereira.net/efficient-pagination-dont-use-offs…

This seems to be the same article.

I have my doubts about the technique, but it could be useful in certain controlled situations.

Why You Shouldn't Use OFFSET and LIMIT For Your Pagination

Gone are the days when we wouldn’t need to worry about database performance optimization.

Why You Shouldn't Use OFFSET and LIMIT For Your Pagination

I was going to recommend looking at www.elastic.co/…/paginate-search-results.html#scr… - but it looks like that method is now not advised- but if you read up above it it looks like there’s a search_after/PIT method described which sounds similar to the article.

This is all to say - I don’t think this is a one-off concept - it’s been around for a bit.

Paginate search results | Elasticsearch Guide [8.11] | Elastic

It depends on what you want to do and how you want it to behave if data is inserted or deleted. “Ten items after the last one I’ve seen” is another thing than “items 30 to 39”.