In this article, i will introduce the internal join techniques, which sql server uses to perform various joins internally also known as Nested Loop, Merge and Hash Joins. These types are not directly exposed to us but we can use them as a query hint. These are also known as physical joins in SQL Server. So lets explore this topic together “Nested Loop, Merge and Hash Joins in SQL Server”.
In our queries, simply we write as below;
From AdventureWorks2012 Database:
Now its a job of sql server to create an appropriate plan for the query, execute it and return the result set to the caller. SQL Server has multiple components to perform this series of tasks including query parsing, creating query tree, creating binary plan and after all executing the query and returning the result set.
The actual execution of the query is handled by storage engine component of … More