PCB
PCB

Reputation: 767

Creating multiple objects using JPA

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

Upvotes: 0

Views: 691

Answers (2)

newOne
newOne

Reputation: 698

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

Upvotes: 3

appzone_oto
appzone_oto

Reputation: 333

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.

Upvotes: -1

Related Questions