• superlangerkerl (10/7/2009)


    It was a good article, however these are fundamental types of joins. I would like to have seen something on hash joins and merge joins.

    I had noted your post and then noted that nobody responded. There is a difference in the type you mention that almost puts them outside this kind of article.

    I was about to spout off and say that these are things available to the query optimizer only. You don't get to tell SQL Server how to join only what to join. Then I did some more research and found out that you CAN tell the query optimizer what to do. There is this thing called "Join Hints". But Microsoft says:

    Because the SQL Server query optimizer typically selects the best execution plan for a query, we recommend that hints, including <join_hint>, be used only as a last resort by experienced developers and database administrators.

    For the most part I tend to agree. Then understanding what goes on under the hood (bonnet) and why the query optimizer picks what it does can be helpful.

    From MSDN:

    Join Hints

    Understanding Hash Joins

    Understanding Nested Loops Joins

    Understanding Merge Joins

    Those links will get you started.

    ATBCharles Kincaid