如何在JPA中执行BATCH插入? [英] How to do the BATCH insert in JPA?
问题描述
我正在使用JPA和Hibernate持久性。
我们在以下配置中使用JPA。
I am using JPA with Hibernate persistence. We are using JPA in the following configurations.
persistence-api 1.0 version
hibernate-core 3.3.2.GA version
hibernate-entitymanager 3.4.0.GA version
有可能在JPA中使用批处理插入以上配置?
Is it possible to use Batch Insert in JPA with above configuration?
请建议如何执行BATCH插入。我们希望在一个表中插入多行而不影响数据库的性能。还建议有多少行插入实际上可以批量使用?
Please suggest how to do BATCH insert. We want to insert multiple rows in a single table without affecting performance of Database. Also suggest how many row insert is practically possible to use in batch?
感谢预测
Thanks in Anticipations
推荐答案
JPA本身没有对批量插入的特定支持。
但是,因为您使用Hibernate,请查看: http: //docs.jboss.org/hibernate/core/3.3/reference/en/html/batch.html
JPA itself does not have have specific support for batch insert. However, because you use Hibernate, take a look to: http://docs.jboss.org/hibernate/core/3.3/reference/en/html/batch.html
这篇关于如何在JPA中执行BATCH插入?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!