-->
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: Hibernate Java PersistantBag.size() Performance Problem
PostPosted: Fri Mar 27, 2009 7:37 am 
Newbie

Joined: Thu Mar 26, 2009 2:32 pm
Posts: 3
Location: Germany
Hi,

Sorry, this message should be devoted to the hibernate forum! It's a Java based problem.

I am writting a Hibernate based application for the open source project www.opentms.de.

I encountered now the strange problem (at least to me) that when I run a query
Code:
query = session
                    .createQuery("select m from SQLMonoLingualObject s, SQLMonoLingualObject t, SQLMultiLingualObject m where s.parentMultiLingualObject = t.parentMultiLingualObject and s.language = '"
                            + sourceLanguage + "' and t.language = '" + targetLanguage + "' and  m.id = s.parentMultiLingualObject");


and then retrieving all the found objects the application nearly spends all the time in the method PersistantBag.size() as shown in the picture.

Image

The model behind the data is simple:

A MUL (MultiLingualObject) has some string attributes, a list of TmxProps (bidirectional OneToMany) and MOLs (bidirectional OneToMany) associated with it. A MOL (MonoLingualObject) has some string attributes and a list of TmxProps (bidirectional OneToMany) associated with it.

Any idea what is the reason for this strange behaviour?

Thanks for help or explanations!

Klemens


Top
 Profile  
 
 Post subject: Problem solved
PostPosted: Sat Mar 28, 2009 12:11 pm 
Newbie

Joined: Thu Mar 26, 2009 2:32 pm
Posts: 3
Location: Germany
I solved the problem by using another select statement. I just retrieved the variables I needed instead of reading all the objects.

Klemens


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.