-->
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: SEQHILO and multiple SessionFactories / JVMs
PostPosted: Mon Oct 05, 2009 4:46 am 
Newbie

Joined: Fri Oct 02, 2009 5:16 am
Posts: 1
Hi,

Currently we are using ‘sequence’ as the id generator but where we have a lot of inserts (which are done as part of a wider saveOrUpdate on a parent object) hibernate is selecting from the sequence and then running the insert, understandably so that it can set the id onto the object, but this appears to be causing quite a slowdown where we have a LOT of inserts. This runs a lot faster with seqhilo because of fewer trips to the DB but just wanted to ensure there is no risk of id collision between different session factories using the same strategy. Specifically with an underlying Oracle sequence and with multiple hibernate session factories on multiple app servers on multiple machines.

Also - if we change to use seqhilo it will be on top of a set of existing data and an already used (albeit absolutely sequentially and not as a seed) sequence. Could this cause any id collision issues?

Alternatively - is there a way to force hibernate to use inline .nextval or something similar in the insert and not to bother trying to populate the ID back onto the object? Since we don't need it and just want the insert to be fast.

Thanks,
Martin


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.