Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Join Hint

Author  Topic 

daidaluus
Yak Posting Veteran

73 Posts

Posted - 2009-03-29 : 04:11:10
Is there any reason or condition that we use a join hint (LOOP, HASH or MERGE)?

sunitabeck
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2009-03-31 : 20:04:22
In my limited experience, I don't know of any reason to use a join hint. If you do force one, the performance may in fact be worse than had you left it to the optimizer. If you are thinking about this because your query plan shows hash joins, more likely than not, that is because there are no proper indexes on the columns you are joining on.

But, the fact that SQL gives you the capability to specify a join hint means that there has to be some use for it.
Go to Top of Page
   

- Advertisement -