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.  [ 4 posts ] 
Author Message
 Post subject: performance issue because of Deeply Nested DB structure
PostPosted: Sun Jul 23, 2006 11:09 am 
Newbie

Joined: Sun Jul 23, 2006 10:52 am
Posts: 3
Location: Bangalore, India
In my project we are facing performance related issues because of the DB design ,We cannot change the DB structure.

The issue is because we have 4 levels of nesting of objects with one to many relationships between them.
A (1-*) B (1-*) C (1-1) D

I cant lazy load them also I need to load all of them initially itself due to the project requirement.

If A had 10 rows, for each A row there were 10 rows in B and for each row in B if there were 10 rows in C and for each row in C we had one row in D.

Still it needs to make
Quote:
1+10+100+100 hits
, Is there any way to handle this scenario.

Please help me in handling this performance issue.

Thanks,
Venkat.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 23, 2006 4:14 pm 
Regular
Regular

Joined: Mon Jun 13, 2005 12:21 pm
Posts: 61
Location: Hannover
Could you be a little more specific? What do you mean with "hits" the number of database rows required for you're data? The number of SQL statements? The amount of data transfered via JDBC?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 24, 2006 7:12 am 
Newbie

Joined: Sun Jul 23, 2006 10:52 am
Posts: 3
Location: Bangalore, India
What I meant to say was the number of SQL statements executed .


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 24, 2006 11:46 am 
Regular
Regular

Joined: Mon Jun 13, 2005 12:21 pm
Posts: 61
Location: Hannover
Ok, so you should check you're query statements (are you using hql?) and try to fetch more than one row in a statement. Maybe you should also check you're mapping. You can use "select-join" to get collections with an outer join instead of an separate select.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.