Link to home
Start Free TrialLog in
Avatar of Sathish David  Kumar N
Sathish David Kumar NFlag for India

asked on

performance-issue-of-one-to-many-jpa-records

I have relationship with one to many (parent- child ) relationship. while using JPA save method.
Parent have one record child have 5000 to 10000 records . 5k records are in list
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
@JoinColumn(name = testId")
private List<test> testList;

Open in new window

Likewise I defined . but while I am saving it take much time . how to reduce the save timing . 
Avatar of Tomas Helgi Johannsson
Tomas Helgi Johannsson
Flag of Iceland image

Hi,

What is the database behind this JPA code? Look at the tables and relationship and make sure that proper indexes are in place.

Regards,
     Tomas Helgi

Avatar of Sathish David  Kumar N

ASKER

Microsoft sql - I created index for that key but no use 
ASKER CERTIFIED SOLUTION
Avatar of Tomas Helgi Johannsson
Tomas Helgi Johannsson
Flag of Iceland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial