A keyset pagination is usually used for large tables. A last value of 
search key (id in your query) from previous page is remembered and next 
page is loaded with WHERE id > _previous_id_ FETCH NEXT 1000 ROWS ONLY. The 
last returned id is remembered again and is used to load a next page on 
request, and so on. Loading of each next page will take nearly the same 
amount of resources as for any previous page.

But if you need to jump to page No. 20,000,001 immediately there are no 
good solutions for most use cases. Of course, if rows are not deleted, you 
can add an indexed column with strictly sequential numbers (or with page 
numbers) and use it in WHERE condition.

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to