July 17, 2012 at 3:06 pm
I was sent Scripts to execute multiple Merge Statements.
There are no Go Stement between each Merge which may be a good thing.
Will the scripts execute in parallel and cause blocking or what?
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
July 17, 2012 at 3:11 pm
Welsh Corgi (7/17/2012)
I was sent Scripts to execute multiple Merge Statements.There are no Go Stement between each Merge which may be a good thing.
Will the scripts execute in parallel and cause blocking or what?
Do any other sql statements run in parallel??? Nope. The process one at a time just like every other query. :rolleyes:
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
July 19, 2012 at 7:11 am
If you execute multiple scripts on multiple connections, they can block/deadlock each other, just like any other scripts. But if they're sequential in one script, and you run it on one connection, it'll run sequentially. No GO statements needed.
Merge takes a little bit to get used to, but it's just another DML command, just like Insert/Update/Delete, and follows the same rules for contention, et al.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy