-->
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: How long should i wait until to commit changes?
PostPosted: Thu Feb 20, 2014 4:44 am 
Newbie

Joined: Wed Jan 29, 2014 5:19 am
Posts: 2
Is there a rule when to commit changes to the data base?

For examples i want to save 20 objects. Could i do that w/o doing any commits in between?
What is a good rule of thumb?

Thx for any hints
Klaus

Some basic information to that topic:
http://www.tutorialspoint.com/hibernate/hibernate_batch_processing.htm


Top
 Profile  
 
 Post subject: Re: How long should i wait until to commit changes?
PostPosted: Fri Feb 21, 2014 5:54 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
There is no specific rule. Usually you have a requirement that several changes need to be part of the same commit.

In some other cases, you are forced to make smaller commits because including too many changes in one large commit might make it too slow.
Generally speaking, each commit has a performance cost so if you have to write just 20 objects and these are not huge, you should include them all in the same commit.

_________________
Sanne
http://in.relation.to/


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.