This week's book giveaway is in the Spring forum.
We're giving away four copies of Spring in Action (5th edition) and have Craig Walls on-line!
See this thread for details.
Win a copy of Spring in Action (5th edition) this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

Hibernate performance issue - single sesson for whole proces  RSS feed

 
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!