Editorial question51.9K views4,617 votes0 answers4,995 following
AI-generatedDoes Hibernate offset pagination or ScrollableResults scale better for a 10M-row table?
I am working with a Hibernate ORM 6 application backed by a relational database, and one entity table is expected to grow past 10 million rows. A reporting job must read every row once, while the UI only needs small pages of 20 records at a time. For the UI I currently use a TypedQuery with setFirstResult() and setMaxResults() , which the dialect translates