Thomas Herth (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=712020%...
) *commented* on HHH-16790 (
https://hibernate.atlassian.net/browse/HHH-16790?atlOrigin=eyJpIjoiMTA2NT...
)
Re: Performance issue when retrieving a large bulk of entity in bidirectionnal association
(
https://hibernate.atlassian.net/browse/HHH-16790?atlOrigin=eyJpIjoiMTA2NT...
)
I uploaded hibernate6-eager-fetching-performance-issue.zip with two sample projects, one
using Spring Boot 3 and Hibernate 6 and the other using Spring Boot 2 and Hibernate 5.
Even the domain classes can be optimized - I detected two unnecessary eager fetchings - we
can see that Hibernate 6 is significantly slower than Hibernate 5 when fetching the
collections.
The log files included in the ZIP file show two runs with 200 C1Sets. First the run of
H6Sample creates the C1Sets and then lists them. Second the run of H5Sample uses the same
data to list all C1Sets. Time needed for listing: 40 seconds vs 1.5 seconds using Postgres
13
H6Sample:
http://localhost:8086/c1sets
http://localhost:8086/swagger-ui/index.html#/c-1-set-controller/listAll
H5Sample
http://localhost:8085/c1sets
http://localhost:8085/swagger-ui/index.html#/c-1-set-controller/listAll
In BootstrapService the number of C1Sets to be created can be changed. Maybe you want more
C1Sets e.g. when using using an H2 database for the tests - or less. Using Postgres 20
C1Sets are enough to see a difference.
I hope this helps finding a solution for this issue.
(
https://hibernate.atlassian.net/browse/HHH-16790#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16790#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100227- sha1:3bc807d )