OFFSET 100000 does not skip rows cheaply - the engine produces and discards all 100,000 of them first. Page 1 is instant, page 5,000 times out, and the same query drifts as rows are inserted underneath it.
Run this yourself in the Online Java Compiler, spin up a live REST API in the API Sandbox, or practise with Java interview questions.
Published 2026-08-25