I need to parse a very large file and store the resulting entities in a database.
I am expecting up to 150k records per file and would liek to process those in batches.
Is there a way to perform batch insert of a Play entity with JPA?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To save memory you must make sure that the session is cleared regularly, so
How ever you can improve your performance if you optimize the batch size
hibernate.jdbc.batch_size 100You can simply add the last line to the
application.conf, all hibernate.* properties go directly to hibernate. See the code of theJPAPluginfor details.