Quote:
Btw. How do you use hi-lo when you actually want to use a sequence which increments by another value than 1?
Hi/lo is deprecated. There's no reason to use it anymore. You should use pooled or pooled-lo instead.
Now, about gaps. There's no performance impact for having a sequence with an INCREMENT BY, and, usually, you'd pick a reasonable increment, like 2 or 5, depending on how many entities you tend of creating in a batch.
One example: an Image always has 5 Versions. Then, the Version sequence will use an INCREMENT BY 5 because I will always create 5 Version objects belonging to an Image.
If most of the time you are inserting a single entity, then you don't need any optimizer. However, if you have a batch process which imports hundreds of entities, then you should use an optimizer.