This article (https://vladmihalcea.com/hibernate-hidden-gem-the-pooled-lo-optimizer/) gives a good explanation on the differences for the hilo
, pooled
and pooled-lo
optimizers for sequence generators. It also explains that since hibernate 5, pooled
optimizer is used as the default if the allocation size is greater than 1.
Is there an advantage in using the pooled-lo
optimizer vs the default pooled
optimizer? I did notice that for pooled
, there is one extra database call to get the "next hi" value (I think because of how the computation works). Other than that, I'm not sure if there's a difference in performance between the two.
Why is pooled
used as the default? And is there a significant advantage in using pooled-lo
?