I need to insert many entities into the database via Hibernate. So, I want to find the most effective algorithm for Id generation.
Accordingly Hibernate Documentation exists four widely used generation strategies:
- IDENTITY
- SEQUENCE
- TABLE
- AUTO
I should use MySQL database, so I cannot apply SEQUENCE generation strategy. What about other strategies? What is the most efficient from performance point of view?