SQL Server join - Posted on August 29, 2008 at 18:00 PM by Amit
Satpute
Explain Nested Join, Hash Join and Merge Join in SQL query plan.
In nested joins, for each tuple in the outer join relation, the
system scans the entire inner-join relation and appends any tuples that match
the join-condition to the result set.
Merge join
Merge join If both join relations come in order, sorted by the join
attribute(s), the system can perform the join trivially, thus: It can consider
the current group of tuples from the inner relation which consists of a set of
contiguous tuples in the inner relation with the same value in the join
attribute. For each matching tuple in the current inner group, add a tuple to
the join result. Once the inner group has been exhausted, advance both the
inner and outer scans to the next group.
Hash join
A hash join algorithm can only produce equi-joins. The database system
pre-forms access to the tables concerned by building hash tables on the
join-attributes.
The answers to following questions will be made available soon. Keep
visiting.
Define SQL Server Join.
What is inner join? Explain with an example
What is outer join? Explain Left outer join, Right outer join and Full outer
join.
|