Click here to Skip to main content
15,891,423 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am inserting more than 3 million records stored in .csv file having size of around one GB and it takes more than 4 minutes to finish the operation.

I have developed a windows program to do the same job using C#.Net.

Please help me to minimize this bulk insert operation time..
I want to reduce this time complexity..

please help..
Posted
Updated 14-Apr-12 1:57am
v2
Comments
Reza Ahmadi 14-Apr-12 6:41am    
Please attach your code here

1 solution

The quickest/easiest thing that you can do is schedule the task to run in the middle of the night when it's not likely to be noticed.

Inserting millions of records and expecting it to take zero time is simply unreasonable and it's highly unlikely that any amount of coding is going to reduce the amount of time that it takes. Parallel tasks running on multiple cores *might* help but I do not know that for certain.

If you really need to improve the time that it takes to perform this task, then your time and money might be better spent improving your hardware which is probably your bottleneck. Faster drives, more RAM could more more of a difference than any coding that you can do.
 
Share this answer
 
v2
Comments
djrocks0101 17-Apr-12 2:14am    
Thanks for your answer sir..
Actually, the file that I am importing is trade file from different stock exchanges and the volume of records are in millions...I just wanna know that what can be different options to optimize the performance of bulk insert...
please suggest me some good solutions.....
[no name] 17-Apr-12 6:46am    
Had you actually read my answer to you, you would have seen that probably the only real way to minimize the time is to get faster processors, faster hard drives and more RAM.
djrocks0101 17-Apr-12 9:35am    
I am having high system configuration..having 2GB of RAM and Dual core intel processor..I want some solution by code..
[no name] 17-Apr-12 18:30pm    
Well then good luck with that.
djrocks0101 25-Apr-12 8:36am    
sir please suggest me some solution by code..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900