M
Michael C
I'm writing a program that, among other things, has to create and populate 7
tables on SQL Server. It reads in TAB delimited files, generates INSERT
statements and executes them. So far I've been able to optimize the program
by using the built-in streamreader and string functions (Split, Replace,
etc.) in C#, SqlConnection and SqlCommand for connectivity, and I've tried
to optimize the SQL insert statements (there are over 100,000 of them) by
sending them 500 at a time to cut down on the communication overhead
associated with sending SQL commands over a network. I tried going up to
1,000 at a time, but the prep time on the local computer starts eating away
at my time savings. Is there anything else I can do to optimize and speed
up my SQL inserts? (Stored Procedures are not an option).
Thanks,
Michael C.
tables on SQL Server. It reads in TAB delimited files, generates INSERT
statements and executes them. So far I've been able to optimize the program
by using the built-in streamreader and string functions (Split, Replace,
etc.) in C#, SqlConnection and SqlCommand for connectivity, and I've tried
to optimize the SQL insert statements (there are over 100,000 of them) by
sending them 500 at a time to cut down on the communication overhead
associated with sending SQL commands over a network. I tried going up to
1,000 at a time, but the prep time on the local computer starts eating away
at my time savings. Is there anything else I can do to optimize and speed
up my SQL inserts? (Stored Procedures are not an option).
Thanks,
Michael C.