I disagree for the following reason: Take this scenario where 2 users
are updating the database and HiLo max_Lo is 1000.

user 1:
   - get next_hi for customer entity -> 1
   - insert custmer -> custmer_id = 1001
   - get next_hi for employee entity -> 2
   - insert employee -> employee_id = 2001

user 2:
   - get next_hi for customer entity -> 3
   - insert custmer -> custmer_id = 3001
   - get next_hi for employee entity -> 4
   - insert employee -> employee_id = 4001

while if you get the next_hi per session it will:

user session 1:
   - get next_hi for customer entity -> 1
   - insert custmer -> custmer_id = 1001
   - insert employee -> employee_id = 1002

user session 2:
   - get next_hi for customer entity -> 2
   - insert custmer -> custmer_id = 2001
   - insert employee -> employee_id = 2002

you can see the second implementation is much better and more
efficient.

On Sep 14, 5:28 pm, Tuna Toksoz <[email protected]> wrote:
> This is something not harmful, why do you care for id's anyway? if you want
> you can implement your own generator. This is, I believe nice feature of
> Hilo as you can track id's better.
>
> Tuna Toksöz
> Eternal sunshine of the open source mind.
>
> http://devlicio.us/blogs/tuna_toksozhttp://tunatoksoz.comhttp://twitter.com/tehlike
>
>
>
> On Mon, Sep 14, 2009 at 4:54 PM, Delucia <[email protected]> wrote:
> > 1000- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to