0

I am implementing a service which imports data into DB using hibernate. the number of db entries it creates might be between 10 to 10 million

Can I just use the list interface of JPA to save such data or do I need to do some optimization ? or do we have based on the size like below.

  1. when the number of objects is < 10
  2. when the number of objects is in 100s
  3. when it is in millions
2
  • 1
    Creating many objects in DB? What do you mean? Commented Nov 20, 2017 at 11:26
  • 2
    Your question is not detailed enough. Are you talking about bulk inserts of rows in a database? Commented Nov 20, 2017 at 11:27

2 Answers 2

3

If you want to insert multiple rows to DB by Hibernate you can try use batch insert.

Sign up to request clarification or add additional context in comments.

1 Comment

Just thinking what should be the batch size
-1

There really is no best practice to the amount of Objects you can create in the database. But just note, if an Entity is important create an Object of it in the database.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.