File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Object Relational Mapping and the fly likes Bulk Insert in JPA 2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Bulk Insert in JPA 2" Watch "Bulk Insert in JPA 2" New topic

Bulk Insert in JPA 2

Aalok Singh

Joined: May 27, 2010
Posts: 14
Hello Ranchers,

How to perform bulk insert in JPA 2..?


Ivan Korhner

Joined: Jan 11, 2015
Posts: 6
There are a few ways to optimize bulk insertion in Hibernate( flush manually, staless sessions, allocate ids instead of fetching everytime, etc). You can check this link for various tips with performance gains measurements:

Good luck!

Visit my blog:
I agree. Here's the link:
subject: Bulk Insert in JPA 2
jQuery in Action, 3rd edition