Thread: Why NESTED LOOP Not Allowed for FULL and RIGHT Join.

Why NESTED LOOP Not Allowed for FULL and RIGHT Join.

From
"Rushabh Lathia"
Date:
<br />Hi,<br /><br />can anyone let me know that why Nested Loop path is not allowed if jointype<br />are JOIN_RIGHT or
JOIN_FULL?<br/><br /><br />At match_unsorted_outer(), we having case where nestjoinOK = false if there are<br
/>JOIN_RIGHTor JOIN_FULL. <br /><br />match_unsorted_outer()<br />{<br />....<br />        case JOIN_RIGHT:<br />   
   case JOIN_FULL:<br />            nestjoinOK = false;<br /><br />..<br />}<br /><br />wondering why ?<br /><br
/>Regards,<br/>Rushabh Lathia <br /><br /><a href="mailto:rushabh.lathia@EnterpriseDB.com">
rushabh.lathia@EnterpriseDB.com</a><br/> 

Re: Why NESTED LOOP Not Allowed for FULL and RIGHT Join.

From
Tom Lane
Date:
"Rushabh Lathia" <rushabh.lathia@gmail.com> writes:
> can anyone let me know that why Nested Loop path is not allowed if jointype
> are JOIN_RIGHT or JOIN_FULL?

How are you going to track which of the inner-relation rows never find a
join partner and hence need to be emitted on their own?
        regards, tom lane