How index helps for join in sql server?

  • Hello Everyone,

    How index helps for join in sql server ? when we join two tables how the index took place, in which manner it executes the query? is there any links to read out to understand this ?

    I understand how the where clause works, by the this video..

    Is there any other video or article link to understand about join vs index

  • One of the first results on Google for "sql server join index":

    Indexes and Joins

    (it is written for SQL Server 2000 though, but a lot will probably still be applicable.)

    You should try Google sometimes, it's really amazing.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Effectively, the use of an index in the ON clause is the same as the use of an index in the WHERE clause. The criteria can act as a filter and can take advantage of the statistics and the index storage as a means of accelerating access. In addition, having the index store the data in the same order that is needed by the query can help speed up joins in some cases. Also, for joins, look to making sure you have enforced (WITH CHECK) foreign keys in place. This is also taken into account by the optimizer.

    If you want lots of details on these discussions, please see my book.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply