Harvesting Large Result Sets in Hibernate Without Loading the World Into Memory
Use fetchSize with ScrollableResults and batch fetching to harvest large Hibernate result sets without loading everything into memory, while avoiding cursor leaks and N+1 queries.