743 reputation
311
bio website spaghettidba.com
location Italy
age 36
visits member for 3 years, 2 months
seen yesterday

Long time DB developer and SQL Server enthusiast.

Blog

Twitter

G+

linkedin

sqlconsulting.it


Oct
2
comment Unique column values between tables
Nice design. As far as the "only one leader" requirement, take a look at this question: dba.stackexchange.com/questions/40324/…
Sep
17
comment Weird deadlock graph
@PaulWhite No, unfortunately no.
Sep
17
comment Weird deadlock graph
@DenisT hmmm, seems very similar to my issue. Again, that would mean that MERGE and UPDATE are taking locks in direct and inverse order. In this case shouldn't I see MERGE in the deadlock graph?
Sep
17
comment Weird deadlock graph
@PaulWhite no worries. Thanks to everyone that dropped by.
Sep
17
comment Weird deadlock graph
Go figure. The application uses a wild mix of native T-SQL and ORM. I would need to trace it accurately and I'm unsure I can do it. However, I doubt the trancount is the core issue.
Sep
17
comment Weird deadlock graph
@Shanky good point, but it should block instead of deadlocking. The only way I see that happening is because of a different order in the UPDATE plan, but it's very unlikely given the simplicity of the plan.
Sep
17
comment Weird deadlock graph
@retracement I agree, I highly doubt the MERGE is the culprit here.
Sep
17
comment Weird deadlock graph
@DenisT yes, I trap the error and retry, but my point is it shouldn't deadlock at all.
Sep
17
comment Weird deadlock graph
@retracement the transaction is called maybe ten times per minute, but it may collide with concurrent executions on the same KeyColumn. Which properties of the index seek are you interested in?
Sep
17
comment Weird deadlock graph
Thanks for dropping by, Paul. I added the execution plan as requested.
Sep
17
revised Weird deadlock graph
Added execution plan picture
Sep
17
comment Weird deadlock graph
Thanks Brent. Why the MERGE statement is not in the deadlock graph then?
Sep
17
comment Weird deadlock graph
@Shanky Look at the waitresource: they're similar but not identical
Sep
17
asked Weird deadlock graph
Aug
23
awarded  Yearling
Apr
17
answered SQL Server Permission
Apr
16
comment Copy+Pasting currency value from SSMS 2012 to excel does not complete or calculate new value
Don't copy/paste, export to excel in one click spaghettidba.com/2014/01/16/…
Apr
15
answered How to export all the security-related information from a SQL Server database
Apr
14
comment Why do Indexed Views not permit non-unique clustered indexes?
I see where you're coming from. Multiple leafs can share the same index key, but the clustering key is always included in NCIs. Is it enough to say that they're always unique internally? I don't think so.
Apr
14
comment Why do Indexed Views not permit non-unique clustered indexes?
Sorry, not yet. You're mixing two things together. Nonclustered indexes do not have to be unique and are not uniquified internally: you're not making this point clear enough. Everything you say in your answer applies to clustered indexes only.