﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Article Discussions / Article Discussions by Author / Discuss content posted by Paul White  / The Right Kind Of Join / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Thu, 23 May 2013 19:04:39 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: The Right Kind Of Join</title><link>http://www.sqlservercentral.com/Forums/Topic1164395-2669-1.aspx</link><description>Join hints is new to me n gonna learn this today..thanks for the question:-)</description><pubDate>Thu, 24 Jan 2013 21:17:04 GMT</pubDate><dc:creator>kalyani.k478</dc:creator></item><item><title>RE: The Right Kind Of Join</title><link>http://www.sqlservercentral.com/Forums/Topic1164395-2669-1.aspx</link><description>Got it wrong but it was a very good question. Need to research this.</description><pubDate>Fri, 23 Dec 2011 10:33:37 GMT</pubDate><dc:creator>SqlMel</dc:creator></item><item><title>RE: The Right Kind Of Join</title><link>http://www.sqlservercentral.com/Forums/Topic1164395-2669-1.aspx</link><description>Learning more and more each day!  Thanks!</description><pubDate>Thu, 25 Aug 2011 06:10:07 GMT</pubDate><dc:creator>Tee Time</dc:creator></item><item><title>RE: The Right Kind Of Join</title><link>http://www.sqlservercentral.com/Forums/Topic1164395-2669-1.aspx</link><description>Got it correct...</description><pubDate>Wed, 24 Aug 2011 16:57:51 GMT</pubDate><dc:creator>BuntyBoy</dc:creator></item><item><title>RE: The Right Kind Of Join</title><link>http://www.sqlservercentral.com/Forums/Topic1164395-2669-1.aspx</link><description>[quote][b]Ernie Schlangen (8/24/2011)[/b][hr]I was able to look this up and find the right answer but I'd be lying if I said that I understood what is going on here.  Is there an article that explains the join hints?  If not, perhaps that's a good area for a future article.  MSDN wasn't particularly helpful to me on this.  I suspect that they expect me to have some base level of knowledge that I'm lacking. :crying:[/quote]Typically SQL server selects the best execution plan for a query and MS recommends that join hints be used as a last resort. Check out the See Also links on the Join Hints BOL page[url]http://msdn.microsoft.com/en-us/library/ms173815.aspx[/url]</description><pubDate>Wed, 24 Aug 2011 10:38:16 GMT</pubDate><dc:creator>kevin.l.williams</dc:creator></item><item><title>RE: The Right Kind Of Join</title><link>http://www.sqlservercentral.com/Forums/Topic1164395-2669-1.aspx</link><description>Thanks for the question!</description><pubDate>Wed, 24 Aug 2011 10:09:30 GMT</pubDate><dc:creator>skrilla99</dc:creator></item><item><title>RE: The Right Kind Of Join</title><link>http://www.sqlservercentral.com/Forums/Topic1164395-2669-1.aspx</link><description>thanks - great question :-)</description><pubDate>Wed, 24 Aug 2011 09:17:46 GMT</pubDate><dc:creator>OzYbOi d(-_-)b</dc:creator></item><item><title>RE: The Right Kind Of Join</title><link>http://www.sqlservercentral.com/Forums/Topic1164395-2669-1.aspx</link><description>Really interesting question, thanks</description><pubDate>Wed, 24 Aug 2011 08:08:23 GMT</pubDate><dc:creator>Daniel Bowlin</dc:creator></item><item><title>RE: The Right Kind Of Join</title><link>http://www.sqlservercentral.com/Forums/Topic1164395-2669-1.aspx</link><description>Nice question. I look forward to more questions related to join hints.</description><pubDate>Wed, 24 Aug 2011 07:08:20 GMT</pubDate><dc:creator>KWymore</dc:creator></item><item><title>RE: The Right Kind Of Join</title><link>http://www.sqlservercentral.com/Forums/Topic1164395-2669-1.aspx</link><description>Good Question on Join Hints. :-)</description><pubDate>Wed, 24 Aug 2011 05:55:02 GMT</pubDate><dc:creator>Kameswari Aravindh</dc:creator></item><item><title>RE: The Right Kind Of Join</title><link>http://www.sqlservercentral.com/Forums/Topic1164395-2669-1.aspx</link><description>I was able to look this up and find the right answer but I'd be lying if I said that I understood what is going on here.  Is there an article that explains the join hints?  If not, perhaps that's a good area for a future article.  MSDN wasn't particularly helpful to me on this.  I suspect that they expect me to have some base level of knowledge that I'm lacking. :crying:</description><pubDate>Wed, 24 Aug 2011 05:54:27 GMT</pubDate><dc:creator>Ernie Schlangen</dc:creator></item><item><title>RE: The Right Kind Of Join</title><link>http://www.sqlservercentral.com/Forums/Topic1164395-2669-1.aspx</link><description>Learned something new again today, thanks.</description><pubDate>Wed, 24 Aug 2011 05:39:49 GMT</pubDate><dc:creator>Britt Cluff</dc:creator></item><item><title>RE: The Right Kind Of Join</title><link>http://www.sqlservercentral.com/Forums/Topic1164395-2669-1.aspx</link><description>nice question!</description><pubDate>Wed, 24 Aug 2011 05:30:39 GMT</pubDate><dc:creator>rfr.ferrari</dc:creator></item><item><title>RE: The Right Kind Of Join</title><link>http://www.sqlservercentral.com/Forums/Topic1164395-2669-1.aspx</link><description>Nice. I had to work for this one - learned quite a bit in the process. Thanks!</description><pubDate>Wed, 24 Aug 2011 05:27:26 GMT</pubDate><dc:creator>Kiara</dc:creator></item><item><title>RE: The Right Kind Of Join</title><link>http://www.sqlservercentral.com/Forums/Topic1164395-2669-1.aspx</link><description>[quote][b]Andrew Watson-478275 (8/24/2011)[/b][hr]Paul - that's exactly what I did when BOL didn't quite give enough information to answer.  I agree with your view on the 2 point question...[/quote]No worries :-)</description><pubDate>Wed, 24 Aug 2011 04:36:36 GMT</pubDate><dc:creator>Paul White</dc:creator></item><item><title>RE: The Right Kind Of Join</title><link>http://www.sqlservercentral.com/Forums/Topic1164395-2669-1.aspx</link><description>[quote][b]Tom.Thomson (8/24/2011)[/b][hr]Isn't the inability to apply the loop hint to a right join a bit bizarre though?[/quote]I would normally answer this, but today's question is one of three... ;-)Question 2 will appear next week (1 September), and question 3 a week later.</description><pubDate>Wed, 24 Aug 2011 04:34:38 GMT</pubDate><dc:creator>Paul White</dc:creator></item><item><title>RE: The Right Kind Of Join</title><link>http://www.sqlservercentral.com/Forums/Topic1164395-2669-1.aspx</link><description>Good question.Isn't the inability to apply the loop hint to a right join a bit bizarre though?  Although it seems pretty obvious why this happens, there is in fact something odd about the exclusion of right join.  After allA right join B on A.x=B.xis identical in meaning to B left join A on A.x=B.xand I can apply a loop hint to the second.  So I ought to be able to apply it to the first, unless the optimiser interprets the loop hint as saying "use a nested loop join where the [strike]out[/strike]inner loop is on the right hand component of the join, that is the table which occurs second in the text of the query" rather than just "use a nested loop join (choosing whichever component the optimiser thinks best for the outer loop)". The optimiser has great freedom generally, and making the loop hint specify more of a constraint on the optimiser than it really needs is out of tune with that usual freedom.edit: "outer" should be "inner", see text struck and replaced above</description><pubDate>Wed, 24 Aug 2011 03:47:59 GMT</pubDate><dc:creator>L' Eomot Inversé</dc:creator></item><item><title>RE: The Right Kind Of Join</title><link>http://www.sqlservercentral.com/Forums/Topic1164395-2669-1.aspx</link><description>Paul - that's exactly what I did when BOL didn't quite give enough information to answer.I agree with your view on the 2 point question; sorry for doubting you.(In real life, they're all 2+ point questions - you never get it handed on a plate).</description><pubDate>Wed, 24 Aug 2011 03:45:22 GMT</pubDate><dc:creator>Andrew Watson-478275</dc:creator></item><item><title>RE: The Right Kind Of Join</title><link>http://www.sqlservercentral.com/Forums/Topic1164395-2669-1.aspx</link><description>Nice! Learnt something new today about hint limitations on RIGHT joins :-)</description><pubDate>Wed, 24 Aug 2011 03:44:09 GMT</pubDate><dc:creator>Kwex</dc:creator></item><item><title>RE: The Right Kind Of Join</title><link>http://www.sqlservercentral.com/Forums/Topic1164395-2669-1.aspx</link><description>[quote][b]Andrew Watson-478275 (8/24/2011)[/b][hr]There would have been less guesswork involved if the full error message had been given instead of just an extract[/quote]You can get the full error text without running the query by checking sys.messages:[code="sql"]SELECT    m.[text] FROM sys.messages AS m WHERE     m.message_id = 8622     AND m.language_id = 1033[/code]I'm comfortable that the question and answers had the right level of detail to make it interesting (it is a 2 point question after all).</description><pubDate>Wed, 24 Aug 2011 03:30:52 GMT</pubDate><dc:creator>Paul White</dc:creator></item><item><title>RE: The Right Kind Of Join</title><link>http://www.sqlservercentral.com/Forums/Topic1164395-2669-1.aspx</link><description>Nice question.</description><pubDate>Wed, 24 Aug 2011 03:17:34 GMT</pubDate><dc:creator>CoolCodeShare</dc:creator></item><item><title>RE: The Right Kind Of Join</title><link>http://www.sqlservercentral.com/Forums/Topic1164395-2669-1.aspx</link><description>Great question, thanks.</description><pubDate>Wed, 24 Aug 2011 03:10:45 GMT</pubDate><dc:creator>Koen Verbeeck</dc:creator></item><item><title>RE: The Right Kind Of Join</title><link>http://www.sqlservercentral.com/Forums/Topic1164395-2669-1.aspx</link><description>There would have been less guesswork involved if the full error message had been given instead of just an extract:[quote]Query processor could not produce a query plan because of the hints defined in this query. Resubmit the query without specifying any hints and without using SET FORCEPLAN.[/quote]</description><pubDate>Wed, 24 Aug 2011 02:49:30 GMT</pubDate><dc:creator>Andrew Watson-478275</dc:creator></item><item><title>RE: The Right Kind Of Join</title><link>http://www.sqlservercentral.com/Forums/Topic1164395-2669-1.aspx</link><description>Pure guess work from me...</description><pubDate>Wed, 24 Aug 2011 02:41:25 GMT</pubDate><dc:creator>adb2303</dc:creator></item><item><title>RE: The Right Kind Of Join</title><link>http://www.sqlservercentral.com/Forums/Topic1164395-2669-1.aspx</link><description>Interesting question, thanks</description><pubDate>Wed, 24 Aug 2011 01:39:40 GMT</pubDate><dc:creator>Stewart "Arturius" Campbell</dc:creator></item><item><title>RE: The Right Kind Of Join</title><link>http://www.sqlservercentral.com/Forums/Topic1164395-2669-1.aspx</link><description>Good question.</description><pubDate>Wed, 24 Aug 2011 00:36:25 GMT</pubDate><dc:creator>kapfundestanley</dc:creator></item><item><title>RE: The Right Kind Of Join</title><link>http://www.sqlservercentral.com/Forums/Topic1164395-2669-1.aspx</link><description>Nice question</description><pubDate>Tue, 23 Aug 2011 22:55:17 GMT</pubDate><dc:creator>SQLRNNR</dc:creator></item><item><title>RE: The Right Kind Of Join</title><link>http://www.sqlservercentral.com/Forums/Topic1164395-2669-1.aspx</link><description>Very nice ...</description><pubDate>Tue, 23 Aug 2011 21:48:54 GMT</pubDate><dc:creator>bitbucket-25253</dc:creator></item><item><title>The Right Kind Of Join</title><link>http://www.sqlservercentral.com/Forums/Topic1164395-2669-1.aspx</link><description>Comments posted to this topic are about the item [B]&lt;A HREF="/questions/T-SQL/75267/"&gt;The Right Kind Of Join&lt;/A&gt;[/B]</description><pubDate>Tue, 23 Aug 2011 21:48:06 GMT</pubDate><dc:creator>Paul White</dc:creator></item></channel></rss>