-->
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: Quick Questions on Batch updates
PostPosted: Tue Mar 02, 2004 10:12 am 
Beginner
Beginner

Joined: Thu Sep 11, 2003 8:41 am
Posts: 35
Location: Atlanta, GA
After reading "how to use batch update feature in the hibernate?" I just wnated to double check a couple of things.

If I want to do batch writes to the database all I have to do is set the property in the config file...

<property name="hibernate.jdbc.batch_size">25</property>

right?

I have a few quick questions about how the batch stuff works.

1) Does Hibernate store the items you are going to insert/update in the session until it reaches it's batch limit, then write everything?

2) If the limit is never reached, I assume it does the batch when commit() is called, is that correct?

3) If I am using the "identity" id generation method and I insert a row with batch enabled, do I have the ability to get the PK from the recently inserted object, even if the batch has not gone off?

4) Finally, is there a limit to the batch_size or a number that you would suggest not going above?

Thanks!
Chris

_________________
I am the reason spellcheck was created!!!


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.