Spring Data JPA : 批量增删(Spring data JPA: batch addition and deletion)

批量保存/删除

Spring Data JPA的saveAll方法执行特别慢

可以使用JPA的EntityManager来实现批量的保存和删除  JPA EntityManager批量保存/删除

参考

解决spring data jpa saveAll() 保存过慢

spring data jpa开启批量插入、批量更新

————————

< strong > batch save / delete < / strong >

The saveall method of spring data JPA is particularly slow to execute

You can use JPA’s entitymanager to save and delete in batches

参考

Solve the problem that spring data JPA saveall() saves too slowly

Spring data JPA enables batch insert and batch update