March 15, 2016 at 1:52 am
Hi, having a senior moment here. If I have several batches defined in a SQL Agent Job, separated by GO will they run sequentially or as the optimiser sees fit?
I.e.
Batch 1
GO
Batch 2
GO
Batch 3
GO
Will they run as Batch 1, Batch 2, Batch 3 or a random order?
...
March 15, 2016 at 9:56 am
It will execute in order. The optimizer can re-order joins based on a better plan but it doesn't re-order batches.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
March 15, 2016 at 12:43 pm
Jack Corbett (3/15/2016)
It will execute in order. The optimizer can re-order joins based on a better plan but it doesn't re-order batches.
Thanks Jack, needed that confirmation and the reassurance I was not completely gaga, but still may separate them into steps.
...
March 16, 2016 at 10:06 pm
Sql statements would be executed always in a serial way regardless of specifying a go separator.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply