-->
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: batch insert best practice?
PostPosted: Thu May 29, 2008 9:52 am 
Beginner
Beginner

Joined: Thu Sep 04, 2003 5:38 pm
Posts: 29
I know how to set up hibernate for batch updates via the properties etc, but for batch inserts with sequences (using postgres sequence) it won't work because it has to fetch them.

I don't want to use the ranged id generator because I don't want holes, which there would likely be with many servers doing this.

So my thought is to just say screw it and use jdbc for this particular operation. I don't really need the objects in memory, I can reread them if needed, the main goal is on call to insert 20 instead of 20 calls.

Sound right? Or is there a preferred way to do this using hql?


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.