Solved

merge join

Posted on 2010-11-17
10
598 Views
Last Modified: 2013-11-10
merge join in distinctively SSIS, not TSQL, right? how does it differ than the other kinds of join (inner, left, self etc)

thanks
0
Comment
Question by:anushahanna
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +2
10 Comments
 
LVL 60

Accepted Solution

by:
chapmandew earned 167 total points
ID: 34161464
Its in both....but they are essentially the same idea.

Inner/Outer/Full joins are LOGICAL joins in the database engine.  Nested Loop/Merge/Hash joins are the physical representations of the logical joins.  Nested loop joins are two outputs, usually a large input and a small input and the small input loops into the large input.  Merge has to sort the two inputs and then merge them together to join them.  Works really well if the inputs are already sorted.  Hash is for the looping scenario OR for two large inputs that are not indexed.  

No, the merge in SSIS is similar to the merge join in the db engine in that it has to physically sort (preceeded by a sort task) before you can merge the results.

Clear as mud?  :)
0
 
LVL 60

Expert Comment

by:chapmandew
ID: 34161469
Correction:
No, the merge in SSIS is similar to the merge join in the db engine in that it has to physically sort (preceeded by a sort task) before you can merge the results.

...missed the w on Now.
0
 
LVL 30

Expert Comment

by:Reza Rad
ID: 34161893
as Champandew noted this is exactly like join types in t-sql.
there are these types there:
inner join --> like inner join in t-sql
full outer join--> like full outer join in t-sql
left outer join --> like let outer join in t-sql
there in no right outer join in merge join transform, but you can only change inputs and use left outer join to have right outer join .

0
Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

 
LVL 30

Assisted Solution

by:Reza Rad
Reza Rad earned 166 total points
ID: 34161907
And note that when you want to use Merge Join Transform in SSIS , your inputs should be SORTED.
0
 
LVL 23

Assisted Solution

by:Racim BOUDJAKDJI
Racim BOUDJAKDJI earned 83 total points
ID: 34162309
As indicated, MERGE JOIN is the physical method that SQL Server's optimizer may select to implement some of its JOIN implementations.   SQL MERGER JOIN is the procedural implementation of the SQL JOINS, which are themselves the implementations of the relational JOIN.

In SSIS, though there are order prerequisites that do not exists in the TSQL engine.

Hope this helps...
0
 
LVL 6

Author Comment

by:anushahanna
ID: 34162782
thanks-

merge join in SSIS- is it possible to say 'No thanks for physical sorting - just inner join the 2 OLEDB input and give it in any sort order"
0
 
LVL 6

Assisted Solution

by:subhashpunia
subhashpunia earned 84 total points
ID: 34162825
Then use other type of joins: Either Nested Loop or HASH join.
0
 
LVL 30

Assisted Solution

by:Reza Rad
Reza Rad earned 166 total points
ID: 34163727
NO,
if you want to use Merge Join Transformation , so you SHOULD sort inputs.
if you don't want to sort inputs, you can use Lookup transformation ( if your inputs are oledb, and you have only ONE joining field) or use t-sql joins in OLEDB Source command if your inputs are both from single server.
0
 
LVL 60

Assisted Solution

by:chapmandew
chapmandew earned 167 total points
ID: 34163742
>>merge join in SSIS- is it possible to say 'No thanks for physical sorting - just inner join the 2 OLEDB input and give it in any sort order"

Nope, you can't do a "merge join" without sorted inputs.
0
 
LVL 6

Author Comment

by:anushahanna
ID: 34165137
Thanks for the help on understanding the merge..
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question