2012/11/29 costa <[email protected]>: > @Oskar: > > Do you have more information about the pooled_low generator?
It's part of the enhanced id generators. Not mentioned in the nhibernate docs unfortunately, but they are supported since NH 3.3. The documentation from Hibernate, section 5.1.2.3 and 5.1.2.3.1 applies: http://docs.jboss.org/hibernate/orm/4.1/manual/en-US/html/ch05.html#mapping-declaration-id-enhanced Basically you can choose between a table based generator or a sequence like generator. The latter will use sequences if supported by the DB, otherwise emulate sequence semantics using a table. In addition to the optimizers mentioned in the documentation, there is also the "pooled-lo" optimizer. The pooled optimizers are IMHO nicer than HiLo since the relationship between used id values and the current value stored in the generator table/sequence is more clear. Also, it becomes easier to use different increment sizes over time. If you use the enhanced TableGenerator and pooled-lo (not pooled), you can even let different concurrent clients use different increment sizes. And the DBA can use increment-by-1 to reserve a single value to use for some table. pooled and pooled-lo will grab the "nextvalue" from the sequence or table. The sequence (automatically) or table (by UPDATE from NH) will then be updated so that the next nextvalue is the read value + increment size. IIRC, pooled will now use values in the range (readvalue-incrementsize) up to (readvalue-1) (so all clients must agree on the increment size). pooled-lo will instead use the range readvalue up to (readvalue + incrementsize -1), which allows for different clients to use different increments. /Oskar > Also, what happens if you have server generated version columns? Do they > lead to extra-trips to the server? > > Thanks > > -- > You received this message because you are subscribed to the Google Groups > "nhusers" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/nhusers/-/k0AqXOOg70QJ. > > 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. -- 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.
