I need to update tens of thousands rows in SQL table row-after-row. How is it possible to speed-up this scenario by some batch update or semething? We use SQL Server 2008.
Edit: I need to update rows (issue SQL) from C# not from the stored procedure because the logic is complicated. I need to, let’s say, “retest” each row individually.
Edit2: We need to “update” whole table (each row). Is it possible to load table by chunks, update them in memory and save back to the database??? How in C#?
Many assumptions here, but what about creating a user defined table type and within your business layer, populate that in-memory table with all the rows that need updated at once and then call a proc that does a proper, set-based update.