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

Physical Operators Expand / Collapse
Author
Message
Posted Wednesday, December 25, 2013 8:37 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Yesterday @ 11:21 AM
Points: 339, Visits: 239
Hi what is the main difference b/n mergejoin, hash join & nested loop join? In which cases those will form? Please tell me which is the very bad performance issue. i.e. most costly operator.
Post #1525896
Posted Thursday, December 26, 2013 5:38 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 10:59 AM
Points: 35,951, Visits: 30,239
ramana3327 (12/25/2013)
Hi what is the main difference b/n mergejoin, hash join & nested loop join? In which cases those will form? Please tell me which is the very bad performance issue. i.e. most costly operator.


Looking at your other posts and to be honest, you're asking a whole lot of questions where the answers are easily found in "Books Online". For example, if you search for "Merge Join" in "Books Online", not only will you find something that tells you what it is, but you'll also get some hints as to when such a join could be a performance problem. Here's the last sentence in that entry.

Merge join itself is very fast, but it can be an expensive choice if sort operations are required. However, if the data volume is large and the desired data can be obtained presorted from existing B-tree indexes, merge join is often the fastest available join algorithm.



If you don't specifically know what "Books Online" actually is, open SSMS, press the {f1} key, and you're there. I strongly recommend that you spend some time looking for the answers to your questions there so that you become more familiar with the tool especially since it's usually much quicker to find your own information than it is to post to a forum.


--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

"Change is inevitable. Change for the better is not." -- 04 August 2013
(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #1525949
Posted Thursday, December 26, 2013 1:55 PM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 11:47 AM
Points: 41,525, Visits: 34,442
ramana3327 (12/25/2013)
Please tell me which is the very bad performance issue.


All of them. None of them.

If there was a join operator that always was a performance problem, why would SQL use it?



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1526044
Posted Thursday, December 26, 2013 2:16 PM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 10:51 AM
Points: 20,458, Visits: 14,078
This reads like somebody is prepping for an interview or somebody just finished an interview.

Gail's answer is entirely accurate. Hang around a bit on the forums and explore some execution plans and you will start to see why.




Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #1526053
Posted Saturday, December 28, 2013 7:35 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Yesterday @ 11:21 AM
Points: 339, Visits: 239
Some are confusing to me. I want to hear from experience guys like you.
Post #1526295
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse