sabri boubaker (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5d694cb...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiY2I3ZmI1MGM3...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16708?atlOrigin=eyJpIjoiY2I3Zm...
) HHH-16708 (
https://hibernate.atlassian.net/browse/HHH-16708?atlOrigin=eyJpIjoiY2I3Zm...
) Same SQL String for two EntityLoader with different byte Arrays (uncomfortable for GC1
Stringdeduplication) (
https://hibernate.atlassian.net/browse/HHH-16708?atlOrigin=eyJpIjoiY2I3Zm...
)
Issue Type: Bug Affects Versions: 5.1.14 Assignee: Unassigned Attachments:
two_entityloaders_with_same_sql_string_but_diff_byte_array.png Components: hibernate-core
Created: 27/May/2023 14:03 PM Environment: Hibernate Core 5.1.14 Priority: Major Reporter:
sabri boubaker (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5d694cb...
)
Hello,
I have a hibernate application with a huge object graph (2000 tables with over 20colmuns
per table).
As known, this will lead to huge memory usage during startup. So I walked over the known
tips; configuring the Query plan cache, the default_batch_fetch_size, the
batch_fetch_style, and all the stuff.
Now, some of my EntityLoaders (within the same singleTableEntityPersister), have exactly
the same generated SQL (exactly character by character), so I was looking if Hibernate
offers a way to share these Strings (SQL) between EntityLoaders without success.
So I used the GC1 StringDeduplication but without gaining too much. The reason seems to be
that even if Sql(s) are the same (visually) they do not have the same byte array, and the
GC1 won't be able to deduplicate the String and memory still occupied.
Can It be related to Encoding when hibernate create the SQl String? No idea. Maybe I'm
missing something
(
https://hibernate.atlassian.net/browse/HHH-16708#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16708#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#100225- sha1:85acc52 )