I may have been a bit daft here. We've got a thing on our intranet where people can upload CSV data files - contact records and stuff - into our SQL Server. Being a bit of a plank, I just wrote a page that'll loop through the CSV file and fire a stored proc to do the insert for each row it finds.
These CSV files can be fairly large - ten or fifteen thousand lines, say. My upload page can take several minutes to process one file.
Now I just wrote it like that because (a) I forgot you can run several SQL statements in one call, and (b) I assumed that, since stored procs are fastest, calling a stored proc several thousand times would be the best way to do it.
This may not be the case. Does anyone know, before I go changing my code? If I loop through a CSV file, adding INSERT statements to one huge SQL string and then fire that, is it likely to be faster than hitting a stored proc several thousand times?