Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Deadlock due to intra-query parallelism Expand / Collapse
Author
Message
Posted Saturday, December 15, 2012 12:59 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 2:40 PM
Points: 42,335, Visits: 35,391
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 2008, MVP
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

Post #1396881
Posted Sunday, December 16, 2012 9:17 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Yesterday @ 1:31 PM
Points: 16, Visits: 940
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.
Post #1397074
Posted Sunday, December 16, 2012 9:30 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Yesterday @ 1:31 PM
Points: 16, Visits: 940
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 ?

Post #1397076
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse