I need to process 4Millions records in java. Need to copy from AS400 to Oracle. What i am doing is i am commiting records batch by batch. Batch size is user defined. Lets suppose its 100.
I am creating a connection object and creating a batch of 100 records and commiting it. Once i complete commiting 2000 I am creating a new Connection Object by closing the existing one.
So, Now I have the below doubts.
1.once i commit the batch, the data I committed 100 records will be in the memory? In Connection Object? Because i have not closed it?
- What If I create a new connection object once i commit 100 records. So in this case i will endup creating connection object like more than 100, and closing it properly. Will it be a performance impact?