Hibernate batch insert is not working for me on Oracle database.
I have read
Having
hibernate.jdbc.batch_size=30
hibernate.order_inserts=true
hibernate.order_updates=true
hibernate.jdbc.batch_versioned_data=true
there are still 2 separate inserts into the same table one by one (logged via net.ttddyy.dsproxy.support.ProxyDataSourceBuilder, not only bare hibernate).
What can be a problem? How can I diagnose it?
Can type:prepared be a problem ? ( "type":"Prepared", "batch":false,
)
2019-07-26 15:04:28.593 DEBUG 23724 --- [ main] org.hibernate.SQL : insert into STUDENT (version, ...) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
2019-07-26 15:04:28.594 INFO 23724 --- [ main] n.t.d.l.l.SLF4JQueryLoggingListener : {"name":"Batch-Insert-Logger", "connection":4, "time":1, "success":true, "type":"Prepared", "batch":false, "querySize":1, "batchSize":0, "query":["insert into STUDENT (version, ...) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"], "params":[["0",...]}
2019-07-26 15:04:28.594 DEBUG 23724 --- [ main] org.hibernate.SQL : insert into STUDENT (version, ...) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
2019-07-26 15:04:28.595 INFO 23724 --- [ main] n.t.d.l.l.SLF4JQueryLoggingListener : {"name":"Batch-Insert-Logger", "connection":4, "time":1, "success":true, "type":"Prepared", "batch":false, "querySize":1, "batchSize":0, "query":["insert into STUDENT (version, ...) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"], "params":[["0",...]]}
I have posted the same question to stackoverflow:
problem-with-configuration-of-hibernate-batch-insert