In our app everytime we're creating a new entity we're calling Oracle to get the next sequence for the entity's id. We're using OracleSequenceMaxValueIncrementer for this.
But we want to decrease the number of calls to oracle.
I was thinking to increase the "Incremented By" value on the sequence table. Right now it is 1. So if we'll increase to 10, we can make the call to oracle every 10 times, and not everytime we need a new sequence. I was hoping to get in the code the "Incremented by" value using OracleSequenceMaxValueIncrementer, but it not support it, so need to perform a regular query.
Is this a common solution for this, I guess common problem?
Asdditional information: The service that we're using to get the next sequence is used by all the entities, where for everyone there is a different sequences table that can have different "increment by". This is why I wrote I'll first query the DB to retrieve the "incremented by" of the specific entity.