You can do this with far less SQL statements with a little pre-processing.
First use an IN query to identify which of the strings you have are brand new and which are existing.
Create a Dictionary<string, int> and count up within your 50,000+ new entries how many are for each string. Then for all the new ones, do a single insert for each.
Then for all the updates, do a single update for each adding the value in the dictionary to the existing value in the table.
That way, assuming the new 50,000+ entries already has a lot of duplication, you'll end up with far less than 50,000 total SQL statements.
Do it all within one transaction.
HTH,
Sam
We're hiring! B-Line Medical is seeking .NET Developers for exciting positions in medical product development in MD/DC. Work with a variety of technologies in a relaxed team environment. See ads on http://careerbuilder.com.