-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Hibernate Statistics - Profiling
PostPosted: Mon Apr 23, 2012 9:30 am 
Newbie

Joined: Mon Apr 23, 2012 9:18 am
Posts: 3
Hi,
I am working on a task in which I need to gather info. on all the SQLs (CRUD) and their execution time per application method call.
My application is developed using play framework, this in turn uses hibernate. I have enabled the Hibernate Statistics, and also in application level I able to retrieve sessionFactory and entity level statistics. But theses statistics are overall count of these many inserts/updates/deletes happened for a specified entity so far. But my requirement is to retrieve the exact SQL/HQL statement and their execution time. Any thoughts on how to get these metrics out of Hibernate?
Please help. Thanks


Top
 Profile  
 
 Post subject: Re: Hibernate Statistics - Profiling
PostPosted: Mon Apr 23, 2012 9:53 am 
Newbie

Joined: Mon Apr 23, 2012 9:18 am
Posts: 3
I really need help on this. Thanks


Top
 Profile  
 
 Post subject: Re: Hibernate Statistics - Profiling
PostPosted: Mon Apr 23, 2012 10:00 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
Quote:
But my requirement is to retrieve the exact SQL/HQL statement and their execution time.


First I would see if your database-engine provides some profiling tools.
If not, I suggest to use p6spy and/with Jahia JDBC SQL Profiler.
It's both rather old stuff, but I never did find a newer and/or better JDBC SQL Profiler.


Top
 Profile  
 
 Post subject: Re: Hibernate Statistics - Profiling
PostPosted: Mon Apr 23, 2012 10:24 am 
Newbie

Joined: Mon Apr 23, 2012 9:18 am
Posts: 3
Thanks pb00067. I will try out Jahia.
Also I came across "Hibernate Profiler" which gives very detailed metrics. I am set up to develop something similar to that.
Any additional thoughts?
Thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.