-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Guidance in Hibernate optimization
PostPosted: Thu Sep 16, 2010 1:43 am 
Newbie

Joined: Thu Sep 16, 2010 1:21 am
Posts: 8
Hi All,

We've developed a web application using struts and hibernate. Now when we tried the load testing of the application, the application failed because of the number of queries it hit for a particular transaction. I have browsed different sites to find out the basic tuning that can be done to hibernate so that the performance can be increased. Please suggest any changes that can be made to the Hibernate configuration.

Presently we are using a lot of sql queries within hibernate. All the mappings done are just default i.e basic mapping tags are used(CLASS and TABLE). Most of the queries are "SELECT" queries and based on entity specific value(Hibernate proxy??).

Also inside hibernate.cfg.xml the properties we are using only show_sql and format_sql.

Please guide.

Thanks,
Sandeep


Top
 Profile  
 
 Post subject: Re: Guidance in Hibernate optimization
PostPosted: Thu Sep 16, 2010 2:58 am 
Regular
Regular

Joined: Fri Aug 06, 2010 1:49 am
Posts: 102
Location: shynate26@gmail.com
Hello Sandeep,

Its obvious there are Select queries. You have to note that queries will be fired not only when u write sql/hql, it will be fires when accessing the reference objects. So its always best to join the reference tables/entity before u query the table in a single fetch. There are configurations where we can make to load the entities in cache. That can be done through ehcache . Your question is generic and cant be answered if you are looking for solution.

_________________

Cheers!
Shynate
mailto:shynate26@gmail.com
www.CSSCORP.com


Top
 Profile  
 
 Post subject: Re: Guidance in Hibernate optimization
PostPosted: Thu Sep 16, 2010 3:55 am 
Newbie

Joined: Thu Sep 16, 2010 1:21 am
Posts: 8
Hi Shynate,

The problem i have here is all the joins and dependency's between the entities are defined at DB level not in hibernate mappings. So is there any properties and fetching techniques i can set to increase the performance, like batch fetching or some other properties i can set ?

Does sql queries degrades the performance over hql ?

Any opinion on the hibernate 2nd level cache?


Thanks,
Sandeep


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.