query performance

wherrera 2014-02-16 00:52:54

what is the best way to update 400 million records ?

any examples thanks

Aaron Bertrand 2014-02-16 01:01:29
Depends on what exactly you are doing (there may be more efficient ways than what you are doing now), but I typically break such operations into chunks both to keep the individual transactions shorter (so you're not blocking people for a long time) and to minimize the impact on the log. The following article may be useful for the general approach I use (it's written for deletes, but not much different for updates).