Most of us
know about JOINS in SQL Server and their types. But do we really know
how they are interpreted in SQL Server internally.
Today I found
lot of informative, interesting and important sources regarding Logical
and Physical joins in SQL Server (links below).
Classifying JOINS mainly into 2 types:
1. Logical Joins:
These joins are simple joins that we apply in our SQL queries, like
INNER JOIN, RIGHT/LEFT OUTER JOIN, CROSS JOIN, OUTER APPLY, etc.
2. Physical Joins:
These are the joins that users don’t use/write in their SQL queries.
Instead these are implemented inside SQL Server engine as operators or
algorithms to implement the Logical Joins. Their types are Nested Loop,
Merge and Hash.
For a
particular SQL query when you try to view an Estimated Execution Plan or
execute a query by selecting Actual Execution Plan, you can clearly see
these Physical Joins under the Execution Plan tab in SSMS.
Merge Join:
Hash Join:
Nestedloop Join:
When both the tables are having less records
Happy Learning!!!
Subscribe to:
Post Comments (Atom)
Search This Blog
DAX - Grouping on multiple columns and the count
Please go thorugh the below URL for entire soultion. http://community.powerbi.com/t5/Desktop/DAX-Grouping-on-multiple-columns-and-the-cou...
-
We can filter an axis based on the members, or based on the measure value. Based on the members: begins with F or after Based on th...
-
Incremental Uploads: We have got a request to need a SSIS package to incremental uploads between two sql server instances which are two d...
-
Follow the below link https://blogs.msdn.microsoft.com/arvindsh/2013/04/23/cannot-resolve-the-collation-conflict-error-message-with-tem...
No comments:
Post a Comment