Question about Hibernate performance using in a Tomcat env.
posted 5 years ago
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')?