Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Joins Algorithms Expand / Collapse
Author
Message
Posted Thursday, May 8, 2014 3:32 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: 2 days ago @ 10:20 PM
Points: 44, Visits: 129
Which is faster : Nested, Merge ou Hash Joins ?

Thanks.

Alexandre Araujo
Post #1569097
Posted Thursday, May 8, 2014 3:50 PM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Yesterday @ 1:01 PM
Points: 15,558, Visits: 27,932
Yes.

Seriously though, each one is more efficient in a given situation. If both data sets are ordered, the Merge join is extremely efficient. If you have a smaller set of data in the inner loop, a nested loops join is extremely efficient. If your data is unordered and large, a hash join can work really well. It's completely situational which one works better in a given situation. That's why the optimizer has the choice. No one join will satisfy all situations.


----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of: SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans

Product Evangelist for Red Gate Software
Post #1569100
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse