C
C
Chvalov2021-02-14 14:19:33
Java
Chvalov, 2021-02-14 14:19:33

What is the difference between pooled and pooled-lo optimizers?

I read Hibernate pooled and pooled-lo identifier generators and Hibernate hidden gem: the pooled-lo optimizer

And I would like to clarify whether I correctly understood the differences between pooled-lo and pooled optimizer?

For example, the parameter is set increment_sizeto 50
pooled-lo: Goes to the database for the value of the sequence, receives for example 150 and generates identifier values ​​in memory for the next 50 sequences (151,152,153...,198,199,200), as soon as the values ​​are over, go to the database again to get the sequence and so on in a circle.
There is only one minus here, if an external client also reserves 50 values, but makes 5 inserts, there will be a gap of 45 values.

Did I understand everything correctly pooled-loand what is the difference from pooled?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question