• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question about Hibernate performance using in a Tomcat env.

 
Cainiao Zou
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

we are running a tomcat application using Hibernate to access to an mysql database and have the problem about the performance using it.

When enabling the hibernate_statistics it shows that database queries in average takes about 20 till 30 ms using hibernate. But the mysql-log shows that they only takes about 1 ms. Are 20 ms slow for hibernate; what are normal values?

And especially the method getRoles() (in Code 'Entitiy-Bean') takes about 50 ms when tracking the time in the code programmatly and hibernate do not log any database access for it. So what's wrong? The XML-Configuration for hibernate is attached too.

And maybe have someone any tips for improving the hibernate performance with tuning the hibernate properties shown below (code 'Hibernate and c3p0 (datasource) configurations')?

We are happy about any idea. Thanks.

Entity-Bean:


Hibernate and c3p0 (datasource) configurations:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic