NicHopper - Friday, February 24, 2017 2:21 AM
Assuming that some of the queries in the script rely on the outcome of some of the earlier queries, the answer is likely because you're changing a good bit of data on the fly and the execution plan that was formed for all the updates is no longer based on the conditions at the time you hit the go button. It may serve you well to add a statement level recompile to many of the queries in the script.
--Jeff Moden
Change is inevitable... Change for the better is not.