Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Optimizing massive update
Message
From
04/04/2015 13:00:30
 
 
To
04/04/2015 11:49:37
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2012
Application:
Web
Miscellaneous
Thread ID:
01617566
Message ID:
01617786
Views:
30
>>We took a similar approach (Temp Table used in a join) for a large nightly update. Our original approach was row-by-row because we thought there would be fewer contention issues. We did not understand, at that time how powerful SQL Server is using a set based approach. Our job went from hours to minutes to complete with no contention issues. For other ideas, google "RBAR SQL"
>
>Thanks, how did you negotiate with unique updates syntax, as far as variations in the fields to update, in a batch approach?

Our scenario was different in that we were doing mostly inserts and deletes. If your job is truly unique updates, I'm not sure how to implement that as a batch process. Could you create datatables or Temp tables of your modified data, then use MERGE to update the target tables?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform