I use JPA along with hibernate for my Spring boot application. I am facing some insert performance issues while doing in bulk. So far the fixes I found are :
- Alter the Oracle Sequence update the '
Increment by
> 1, I am giving 50' - In the Java Entity use the
allocationSize
to same value as OracleIncrement By
So that JPA prevents a call from getting the next sequence.
My sequence is defined as:
CREATE SEQUENCE MYSCM.BOOKING_SCHED_SEQ INCREMENT BY 1 MAXVALUE 9999999999999999999999999999 MINVALUE 1 CACHE 20
When I increase the INCREMENT BY
to 50 should the cache be increased to 50 or reduce?
sequence.nextval
query being issued for each records. I enabled batch inserts which helped improve some performace, still this is a problem. – Morphia