Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Deadlock due to intra-query parallelism


Deadlock due to intra-query parallelism

Author
Message
GilaMonster
GilaMonster
SSC-Forever
SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)

Group: General Forum Members
Points: 47427 Visits: 44405
Abdul Rahman (12/14/2012)
But after interpreting the output and discussing with the developers, they want to start with adding with(Nolock) to all the queries, detected by -T1222.


Won't help. Look at the deadlock graph, no locks there, the waits are all WaitType=e_waitPortOpen.
Optimise the queries or stick a maxdop hint on the query.

Oh, and nolock can cause far more problems than just dirty reads. Are the devs OK with their queries potentially missing rows? Potentially reading rows twice? Those cause really fun problems when the reports created by queries running with nolock have unreproducible errors in them.

See - http://blogs.msdn.com/b/davidlean/archive/2009/04/06/sql-server-nolock-hint-other-poor-ideas.aspx


Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


Abdul Rahman
Abdul Rahman
Grasshopper
Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)

Group: General Forum Members
Points: 16 Visits: 1301
Jeff
Most of the statements are Select statements.
Most of the imports are done by using SSIS packages and the script is created by the application itself.
Abdul Rahman
Abdul Rahman
Grasshopper
Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)

Group: General Forum Members
Points: 16 Visits: 1301
Gail
Thanks for the links on nolocks.

When I check the Profiler output it says
Parallel query worker thread was involved in a deadlock

No other information is provided and the deadlock graph does not give any information even.
It does not mention any spids nor any other details but just a chain\graph.

Also I am not able to understand the WaitType=e_waitPortOpen and not able to get enough information on it.
Could you please educate me on what does that mean ?
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search