How to deal with large offsets in select?
Why not try a where clause? If you index j.data-&gt;'key', a where will only be a log(n).

Another reason may be order by j.data-&gt;'key' is a slow computation. Indexing this can also boost your order by (but the benefit will be far less noticeable than the benefit due to the where clause itself).

This article may help better answer your question:
https://use-the-index-luke.com/sql/partial-results/fetch-next-page