Amol Pingate wrote:Currently my program is working with following steps
3)Check Record is present in DB or not (To avoid duplication)
4)if not present then Fill DB
5)Repeat above steps till end of file.
Then you can have 1 thread to read (step 1) then from that start a new thread for steps 2,3,4.
If you want you can split up steps 3 and 4 to their own threads as well. Also for the data checking, if the file record number corresponds to the db table's primary key then your sql (step 3) can be faster.