Skip to content Skip to sidebar Skip to footer

Optimise Hibernate Sequence Id Generation

I'm facing some performance issues while trying to connect Hibernate with SAP HANA In-Memory database, which has no support for AUTO_INCREMENT (http://scn.sap.com/thread/3238906).

Solution 1:

Values from sequence are fetched one by one, because allocationSize is set to 1. Default value for allocationSize is 50, which is already much better. In this particular case it probably makes sense to use value higher than that, if inserting 40000 record is typical use case.

If script to create sequence is self written (and not by Hibernate), value of INCREMENT BY should be same as value of allocationSize.


Post a Comment for "Optimise Hibernate Sequence Id Generation"