• Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate performance issue - single sesson for whole proces

 
stshiva raaj
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi Team,
I need clarificaton about my applicatio performance. I am using spring and hibernate. Before my application was,
most of the <bag> collections are lazy=false, @ManyToMany as default fetch(fetch=select) and using a session per service layer request(per each reqeust created a session - 500 times).
The child elements are not required very first time while fetching the record. That time, it takes 3 minutes to complete all process.

Now, I have changed the architecture with all <bag> collection are lazy=true, @ManyToMany as fetch=join and single session for whole process. Now, it takes 20 minutes
to complete all process. I don't know, what is happen...

Also, I have set hibernate_jdbc_fetch_size as 50.


I am doubting,
1. Due to single session it cause the issue(become heavy weight object)
2. fetch=join is causing the issue


Please suggest me, Is there any more tune up configuration I need to do in hibernate level.


Thanks in advance
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!