-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
解决save的时候不产生select语句,直接insert,提高批量操作是提升insert的效率 #31
Comments
spring.jpa.properties.hibernate.jdbc.batch_size=100
spring.jpa.properties.hibernate.order_inserts=true The first property tells Hibernate to collect inserts in batches of four. The order_inserts property tells Hibernate to take the time to group inserts by entity, creating larger batches. |
同时需要注意控制好事务大小 |
开启监控
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
第一步实体 implements Persistable, Serializable
第二步重写 isNew方法即可;
参考如下实体:
当新增UserGoldJoursShard对象的时候设置defaultNew=true,调用实例如下:
The text was updated successfully, but these errors were encountered: