question

cwbe-wdepoorter avatar image
cwbe-wdepoorter asked ·

Hibernate list method

Hi

I have a customer that has quite a few long running transactions (>10seconds). When I try to troubleshoot these delays using dynaTrace, I can see that by far most of the time is spent in the List method of the hibernate framework (org.hibernate.impl.SessionImpl.List).

Does anyone know what this means exactly ? Any possible causes ? I spoke to the application owners but they have no idea what can cause this.

I have also attached a screenshot for example.

Kind regards
Wesley

10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

cwbe-wdepoorter avatar image
cwbe-wdepoorter answered ·

Thanks both for the replies !

Kind regards
Wesley

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Andreas G. avatar image
Andreas G. answered ·

Hi Wesley

If the application uses Hibernate the application code itself needs to iterate through the objects stored by Hibernate. There are different APIs in Hibernate that interact with the underlying database. "list" is just one of the methods that retrieves objects from the DB that are later mapped to the Java Objects. So - "list" might not be called directly by the developers as they are interacting with the Mapped Java Objects -but - as we can see with dynaTrace - this is where most of your time is spent when this data is retrieved from the DB.

Please check out the following excellent articles from Alois regarding Hibernate Performance Optimizations - they should help understand on what can go wrong and what to optimize:

Andi

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Christopher A. avatar image
Christopher A. answered ·

Hello Wesley,

We don't see any auto-sensors: are you in a heavily-loaded production environment?
FYI, the list method is used in Hibernate to query the database: it sometimes calls the cache to get the results and performs other kind of things before doing the actual DB call (such as parameters validation). You should maybe work on the auto-sensors to try to get more data about what is going exactly within this method.

Chris

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.