-->
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: Perfomance/Memory problem
PostPosted: Tue Mar 15, 2005 3:07 pm 
Beginner
Beginner

Joined: Tue Jan 04, 2005 5:39 am
Posts: 37
Hibernate version:2.1.8

Hi,

I have a really large "tree-like" object model wich includes many one-to-may mappings with cascade="delete" option.

My problems are starting when i'm trying to delete the "root" object. While Hibernate is performing cascade deletes, it's actually retrieving all object model into the memory. It is very bad for me - from memory consumption and performance point of view. Is there any way to get around this?

May be the framework can (or i can cause it) build delete statements based on parent ID's instead-of traversing all children and deleting them explicitly?

Thanks a lot!
Michael.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 17, 2005 9:54 am 
Beginner
Beginner

Joined: Tue Jan 04, 2005 5:39 am
Posts: 37
I still didn't get an answer ... anyone? Hibernate team?

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 17, 2005 10:04 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
hibernate2 needs to load the object to apply the required lifecycle and cascades.

in hibernate3 you can use batched deletes and/or on-delete="cascade" which can utilizes database-level ON CASCADE DELETE (Be aware that this feature bypasses Hibernate's usual optimistic locking strategy for versioned data)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 20, 2005 5:49 am 
Beginner
Beginner

Joined: Tue Jan 04, 2005 5:39 am
Posts: 37
Thanks!
Look like we are going to upgrade to Hibernate 3.


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.