Craig Freedman's SQL Server Blog

A discussion of query processing, query execution, and query plans in SQL Server.

August, 2006

Blog - About

About Craig Freedman's WebLog

About my blog

I am using this blog to write about how query processing works in SQL Server.

Some of the topics that I write about:

  • How to read and understand query plans and query operators.
  • How different query plans affect performance.
  • The tradeoffs made by the query optimizer when choosing query plans.
  • How subtle changes to a query can affect the choice of plan and impact performance.

About me

I've been developing commercial database engines and working on query processing for more than 10 years.  I've worked for the SQL Server team for more than 5 years and am a co-author of Inside Microsoft SQL Server 2005: TM 2005: Query Tuning and Optimization" href="" mce_href="">Query Tuning and Optimization.  You can learn more about me at this interview.

  • Craig Freedman's SQL Server Blog

    Subqueries in CASE Expressions

    In this post, I’m going to take a look at how SQL Server handles subqueries in CASE expressions. I’ll also introduce some more exotic join functionality in the process. Scalar expressions For simple CASE expressions with no subqueries, we can just...
  • Craig Freedman's SQL Server Blog

    Hash Join

    When it comes to physical join operators, hash join does the heavy lifting. While nested loops join works well with relatively small data sets and merge join helps with moderately sized data sets, hash join excels at performing the largest joins. Hash...
  • Craig Freedman's SQL Server Blog

    Merge Join

    In this post, I’ll describe the second physical join operator: merge join (MJ). Unlike the nested loops join which supports any join predicate, the merge join requires at least one equijoin predicate. Moreover, the inputs to the merge join must be sorted...
  • Craig Freedman's SQL Server Blog

    Summary of Join Properties

    The following table summarizes the characteristics of the three physical join operators which I described in my three prior posts. Nested Loops Join Merge Join Hash Join Best for … Relatively small inputs...
  • Craig Freedman's SQL Server Blog

    Subqueries: ANDs and ORs

    In my “Introduction to Joins” post , I gave an example of how we can use a semi-join to evaluate an EXISTS subquery. Just to recap, here is another example: create table T1 ( a int , b int ) create table T2 ( a int ) create table T3 ( a int ...
Page 1 of 1 (5 items)