Do you, like most people, think that a clustered index seek is always better than a clustered index scan? If so, you need to read this post. You might just be in for a big surprise.
One of the most often encountered concurrency problems in T-SQL code happens in the Insert or Use scenario in which a new row is inserted if it does not exist yet and afterwards the primary key of the existing or the new row is returned. One of the easiest and safest ways to get this right is provided by the MERGE statement.
This article introduces the Hash Join algorithm The Hash Join algorithm and shows in which situations it is a good choice. This algorithm is the most CPU and memory intensive one but if you are dealing with large tables it will often also be the fastest.
This article introduces the Sort Merge Join algorithm. It shows its strengths and weaknesses to help you identify query situations for which the Merge Join operator in the execution plan is an appropriate choice.
This article introduces the Nested Loops Join algorithm. It shows its strengths and weaknesses to help you identify query situations for which the Nested Loops Join operator in the execution plan is an appropriate choice.