Hibernate batch insert, batch update

与世无争的帅哥 提交于 2019-12-04 21:44:04

I have set following property and my performance increased;

hibernate.jdbc.batch_size=50

I am no Hibernate expert but I remember adding a property to log out the sql statements.

     SessionFactory sf = new Configuration()
       .setProperty("hibernate.show_sql", "true")

This should show what sql is being produced after each execution of your method

It will not go in a batch, have a look at Hibernate Doc.

To track if hibernate uses batches you may create logger for org.hibernate.jdbc.AbstractBatcher it will log batcher...

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!