vladmihalcea / hypersistence-optimizer

Hypersistence Optimizer allows you to get the most out of JPA and Hibernate. By scanning your application configuration and mappings, Hypersistence Optimizer can tell you what changes you need to do to speed up your data access layer.
https://vladmihalcea.com/hypersistence-optimizer/
Apache License 2.0
316 stars 43 forks source link

Check if the Hibernate Query iterate method returns an Iterator with more than 100 elements #104

Closed vladmihalcea closed 4 years ago

vladmihalcea commented 4 years ago

Fetching more than 100 records using the Hibernate legacy Query#iterate is an indication that the user might be fetching more data than necessary. A query should return only the data that's needed to render a view or process a certain batch task.

When detecting that the result set contains more than 100 entities, a QueryResultIteratorCountEvent should be triggered.

vladmihalcea commented 4 years ago

Fixed.