Hi Guest

MobileUser

1 HomePage 1 Jobs 1 WalkIn 1Articles  

Cat Exam

 :) Latest Topic
AJAX
VB.NET
SQL Query
UDDI
CLASS
JavaScript Questions
SharePoint Interview
SilverLight
WCF
general knowledge
 ASP.NET
 :) Hot Jobs
 
 :) Latest Articles


  

 
DogFood


Difference in between Merge Join, Hash Join and Nested loop Join?
Question Posted on 09 May 2022

Home >> DataBase >> sql questions >> Difference in between Merge Join, Hash Join and Nested loop Join?




Difference in between Merge Join, Hash Join and Nested loop Join?
Below are most common difference in between Merge, Hash and Nested Loop join:-
0
0

Base of DifferenceMerge JoinHash JoinNested loop Join
IndexWe use Merge join for tables that have an index on join column and this index is either clustered or cover non-cluster index.We use Hash Join for tables with no index (or) either of the big tables has indexed.We use Nested Loop Join for small table with index (or) either of the big tables have indexed.
FunctioningAs this need an index for both the table so it is already sorted and easily match and return the data.As Hash table worked good with big tables with no index and run the query parallel and this will give the best performance.As we got that it is good for small tables like we compares each row from one table to each row from the other table "looping".
AdvantageMerge join are faster and use less memory than hash join. Hash join parallelize and scale better than any of join and it is good at maximizing throughput in data warehouses.Nested loop retrieve first few rows very earlier without having to wait for entire result set.


 
 Input Your Comments Or suggestions(If Any)
 Name
 Email(optional)
 Comments


Other Important Questions
Define N in nvarchar and in nchar?
difference between drop and truncate command
difference between procedure and function
different types of databases in sql
Difference Between Update Lock and Exclusive Lock






 
Top Searches:asp net questions vb net questions sql query uddl questions class javascript Questions sharepoint interview questions and concept silverlight questions and concept wcf questions beans general knowledge ajax questions
PHP | Biztalk | Testing | SAP | HR |