-->
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.  [ 2 posts ] 
Author Message
 Post subject: performance issue...
PostPosted: Fri Feb 11, 2005 11:05 am 
Newbie

Joined: Fri Feb 04, 2005 11:34 am
Posts: 16
Hi,

I had a simple query like "from Person" to get all people. Person has a many-to-many relationship with Category, and it has a set of the categories it is belong to. There is no other relationship of Person. So database is simply a person, category person_category tables.

Performing such query with hibernate takes a very long time (3x or 4x slower) comparing to native sql call via JDBC. I simply query all people and categories they belong to and create the same objects as hibernate does. Do I need to do something else with hibernate ? I had a simple configuration with connection pooling. I know ORM is slower and it is quite normal, but I dont know how slow it is, so I could not know if my code or configurations are wrong or it is just the way it is...

Thanks in advance.

Mete


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 11, 2005 11:55 am 
Newbie

Joined: Mon Jan 17, 2005 9:23 am
Posts: 15
Perhaps you would want to do join fetching to get better performance:

List l = hibernateSes.find("from Person as p join fetch p.categories");


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