Logic performing several hundred queries takes significantly more time in Hibernate 4
Issue
- Migrating from Hibernate 3 to Hibernate 4
- Execution of several hundred queries within a transaction is significantly slower in Hibernate 4
-
High incidence in thread dumps of stack frames like the following
... at org.hibernate.event.internal.AbstractFlushingEventListener.cascadeOnFlush(AbstractFlushingEventListener.java:165) at org.hibernate.event.internal.AbstractFlushingEventListener.prepareEntityFlushes(AbstractFlushingEventListener.java:156) at org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:89) at org.hibernate.event.internal.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:61) at org.hibernate.internal.SessionImpl.autoFlushIfRequired(SessionImpl.java:1166) at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1223) at org.hibernate.internal.QueryImpl.list(QueryImpl.java:101) ...
Environment
- Red Hat JBoss Enterprise Application Platform (EAP) 6
- Hibernate 4
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
