-->
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: Native generator or Hilo generator????
PostPosted: Tue Nov 11, 2003 4:56 pm 
Newbie

Joined: Tue Nov 11, 2003 4:45 pm
Posts: 2
Hi everibody, i'm from Argentina and i'm not write excellent english, apologies for any gramatical error.
The question is: what generator is better for generate primary keys in tables. For example, fields identity in Sybase database for native generator or uses other table to hold the value of the next id using hilo generator, abut this what is the use of maxlo param in this algorithm????.
Thanks for any answer.
Saludos para todos!!!!.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 11, 2003 6:32 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Hi/Lo generator has some restrictions
Quote:
Unfortunately, you can't use hilo when supplying your own Connection to Hibernate, or when Hibernate is using an application server datasource to obtain connections enlisted with JTA.


But it is good since it access DB 1/max_lo times.
max_lo is the range size reserved by the generator to increase id in memory.

If max_lo = 100, and hi value=10000. Generator can generate id from 10000 to 10099 wo requesting DB. If another JVM requests and id value, it will get 10100 as a start value.

I may be +- 1 wrong but the idea is there. You can google hilo algorithm for a better explaination

_________________
Emmanuel


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.