setFirstResult ordering boundary without explicit ORDER BY in Hibernate
Hibernate's setFirstResult and setMaxResults pagination mechanism scans and discards database rows, resulting in O(n) cost for large offsets, a behavior consistent across Hibernate 5.x and 6.x when using standard JDBC. A documented requirement states that explicit ORDER BY is mandatory before pagination to ensure deterministic row ordering; omission yields n