Identifier generator optimization by R4R Team

Identifier generator store values in the database. Identifier generator is inefficient for them to hit the database on each and every call to generate a new identifier value.Then we can group a bunch of them in memory and only hit the database when we exhausted in the memory value group. We can say to this role of the pluggable optimizers. Currently only two enhanced generators are.


1. non(this is default and no optimizer  specified): this can not help to peroform any optimizations and hit the database for each and every requset.

2. hilo: this applies a hi/lo algorithm around the database retrived value. we found the values from the database for this optimizer are expected to be sequential. The value retrived from the database structure for this optimizer indicates the "group number". Here we see the increment_size is multiplied by that value in memory to define a group "hi value".

3. pooled: we can see as in the given case hilo, we see this optimizer attempts to minimize the number of hits to the database. here we simply store the algorithm by increment_size refers to the values coming from the database.

Leave a Comment:
Search
Categories
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!