Try to study how HighLow are working in NH.You will see that you have only two better options: guid.comb : no round-trips because assigned in client side assigned : you custom ID assigned by your application; no round-trips because assigned in client side
After that HighLow is the better option if you want work using Int32 or Int64 as POID. Inside a SessionFactory instance HighLow has a round-trip "per-RootPersister" each 32767 inserts (by default). 2009/3/26 Daniel Auger <[email protected]> > > Example scenario: > - Web farm with 20 servers > - ASP.NET app using SessionFactory singleton pattern > > It would seem then that only 20 different things would interested in > the hi table, and that selects/increments would not be happening too > often with the default maxlow options. That seems quite scalable to > me. > > On Mar 26, 11:38 am, Fabio Maulo <[email protected]> wrote: > > Well... it depend, if you are creating a session-factory for each > > persistence action, the the round-trip to read the High value is only > your > > last concern. > > The roundtrip happen only one time per-session-factory per-table (inside > > maxlow, obviously) > > > > 2009/3/26 Daniel Auger <[email protected]> > > > > > > > > > > > > > Please excuse my ignorance, but can the high table reads/increments > > > ever become a performance bottleneck since every session factory has > > > to do a read/increment on the same table/column? I'm guessing that > > > maybe in theory the answer is yes, but in practicality the answer is > > > no. > > > > > On Mar 26, 8:32 am, Fabio Maulo <[email protected]> wrote: > > > > Ken, in NH is even better because it respect a "sequence per table". > > > > An High is requested per sessionFactory per Persister... > > > > Example: > > > > Table-A: 101, 102,103,104......501,502.... > > > > Table-B: 201, 202, 203, 204... 801,802.... > > > > > > 2009/3/26 Ken Egozi <[email protected]> > > > > > > > the way I understand it: > > > > > > > a generated 64bit ID will consist of a HI and LO 32bit values > > > > > (HI*32bit+LO) > > > > > > > when a SessionFactory kicks in, it requests (and increments) the HI > > > from > > > > > the DB. > > > > > as an outcome - every SessionFactory gets a range (using the HI) > then > > > > > increments the LO on each new entity. > > > > > > > On Thu, Mar 26, 2009 at 11:12 AM, Peter Morris < > [email protected] > > > >wrote: > > > > > > >> It is the thing that you last said, when exhaust a new Hi value is > > > > >> obtained, > > > > >> Lo values are incremented everytime an object is persisted. > > > > >> < > > > > > > >> Ah I see, that makes sense. I am confusing it with the other > approach > > > > >> where > > > > >> only the exact number of IDs are requested when an update is > required. > > > > > > >> Pete > > > > >> ==== > > > > >>http://mrpmorris.blogspot.com > > > > > > > -- > > > > > Ken Egozi. > > > > >http://www.kenegozi.com/blog > > > > >http://www.delver.com > > > > >http://www.musicglue.com > > > > >http://www.castleproject.org > > > > >http://www.gotfriends.co.il > > > > > > -- > > > > Fabio Maulo > > > > -- > > Fabio Maulo > > > -- Fabio Maulo --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
