Code:
select S_ADDRESS.nextval from dual
Hibernate: /* insert Address */ insert into NEXT_TEST."ADDRESS" ("VERSION", "STREET", "HOUSE_NUMBER", "POST_CODE", "POST", "LOCALITY", "FLAT_NUMBER", "COUNTY", "COMMUNE", "CREATE_DATE", "KLU_UNIQ", "ID_ADDRESS_TYPE", "ID_CONTACT", "ID_COUNTRY", "ID_PROVINCE", "ID_ADDRESS") values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
select S_ADDRESS.nextval from dual
Hibernate: /* insert Address */ insert into NEXT_TEST."ADDRESS" ("VERSION", "STREET", "HOUSE_NUMBER", "POST_CODE", "POST", "LOCALITY", "FLAT_NUMBER", "COUNTY", "COMMUNE", "CREATE_DATE", "KLU_UNIQ", "ID_ADDRESS_TYPE", "ID_CONTACT", "ID_COUNTRY", "ID_PROVINCE", "ID_ADDRESS") values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
select S_ADDRESS.nextval from dual
Hibernate: /* insert Address */ insert into NEXT_TEST."ADDRESS" ("VERSION", "STREET", "HOUSE_NUMBER", "POST_CODE", "POST", "LOCALITY", "FLAT_NUMBER", "COUNTY", "COMMUNE", "CREATE_DATE", "KLU_UNIQ", "ID_ADDRESS_TYPE", "ID_CONTACT", "ID_COUNTRY", "ID_PROVINCE", "ID_ADDRESS") values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
This inserts are in one transaction.
This select S_ADDRESS.nextval from dual takes 1/3 time of this task