I’ve been chasing down a series of issues with a system. One of the symptoms we’ve been getting is massive lock timeouts, so I’ve been taking (server side) profiler traces to see what code is requesting the locks that are being timed out. Today I landed on a lovely solution for correlating the lock timeouts […]
Search for: subquery
Thinking All the Way Around a Query: Bonus Material
While I was filming the video to Thinking…Query, named Insert Non-Duplicate Rows, I got the question: instead of a correlated subquery, couldn't you just use a join with a negative condition? So I included that discussion in the video. To review: the problem we're trying to resolve is inserting rows FROM Table1 INTO Table2, ignoring duplicates. […]
Thinking All The Way Around a Query
As so often happens, I had an issue at work today that turned into (I think) a great blog/video idea. Let's start with a simple scenario: We have two tables, each 2 columns wide, each with a 2 column composite key – meaning that (col1, col2) make up the unique primary key together. We want […]