I'm not sure what you mean by ... how do you manage you session?
I'm using a class I found on the web called hibernateUtil. It has methods for getting a session, commit, rollback, close session, etc.
I do not believe the session gets too big. We do not have large resultsets either. We always make sure we commit/rollback and close sessions. As I'm trying to increase performance, I always use the same JSP page. That way I can see if the changes I make have any effect.
The HQL I'm testing with has 4 inner joins and 1 outer join. I was able to increase the speed by removing one of the joins. The resulting SQL (just one by the way) is very fast when I send it directly using the same JDBC driver.
There's a bottleneck somewhere but I can't put my finger on it.
I did set all Hibernate log4j settings to DEBUG and I can see that the lost time is between the SQL and the opening of the result set. That makes me think it's between Hibernate and the JDBC driver. Which would be the Pool. But the pool I'm using is DBCP (on Tomcat 5.5.15). I find it hard to believe it would be the bottleneck.
Anyhow, I'm gonna try to use the pool directly and send the same SQL and see what happens. Let me know if you think of anything else.
Thx
scarface wrote:
How are u managing ur session ... is the session already too big when this query takes place ??