I am using jpa.
i have a requirement like this
i have tables card,account,store, merchant,partner
i have to generate card and according corresponding account for that card.
when i generate 10000 card it takes 5 min (at a time )
when i generate 20000 card it takes 15 min (at a time )
when i generate 30000 card it takes 120min (at a time )
when i generate 40000 card it takes 10hr (at a time )
what may be the reaosn.
after persisting every 50 card i m doingg emp.flush, emp.clear