My requirement is I have to commit 4Million records to Oracle DB.
For that, I have developed a Java program which starts 10 threads. It's a producer and consumer design. Producer pushes data(Range. Ex. 1-1000) for every consumer (Java Thread). Consumers consumes the data and commits that range from one table to another table from Different DBs.
In consumer whenever thread commits data to DB I am logging the range and total no of records committed.
Everything is running smoothly, but after few minutes on console, it's logged that committed records as 90,000 but when I check in DB count is just 40,000.
Even Java program committed data but in Oracle DB why count is less?
After that I came to know multiple commits slow down the process. I am using proper connection pooling and batch processing.
I cannot create DB Link, or can't use another approach for this task. I have to use any Java technology. Normal JDBC , Hibernate or any other technology.
Please help me in resolving this issue.
Your time will be highly appreciated. Thanks.