-->
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.  [ 1 post ] 
Author Message
 Post subject: Why is frequent committing of volume Inserts performant?
PostPosted: Wed Jul 30, 2008 11:32 pm 
Regular
Regular

Joined: Thu Nov 30, 2006 10:48 am
Posts: 59
The thread, http://forum.hibernate.org/viewtopic.ph ... highlight=, talks about improving the performance for saving 20,000 objects.

One responder said that not having a transaction could be an issue and then recommended creating a transaction and committing the transaction every 100 or so saves. Paul Hatcher responded that one should also perform an Evict of the objects after committing the transaction (the commit results in a flush). This is logical b/c less objects for nHib to check the dirty flag.

However, I don't understand why breaking the Save into multiple transactions is performant. If there's enough memory and we start a single transaction to save 20,000 objects, how is this less performant than breaking up the save of these objects to where we commit a transaction every 100 or so?

Thanks very much --
Bill (metazone)

_________________
metazone


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

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.