Merge join requests

The MSJOIN join request element can be used to specify that the optimizer is to join two tables using a merge join method.

Either table can be local or derived, as specified by an access request sub-element, or it can be the result of a join operation, as specified by a join request sub-element. A derived table is the result of another subselect. This join request element is defined by the complex type mergeJoinType.

XML Schema

   <xs:complexType name="mergeJoinType">
      <xs:complexContent>
         <xs:extension base="joinType"/>
      </xs:complexContent>
   </xs:complexType>

Description

The complex type mergeJoinType is a simple extension of the abstract type joinType. No new elements or attributes are added. If the merge join method is not in the search space that is in effect for the statement, the join request is ignored and SQL0437W with reason code 13 is returned.

The following guideline is an example of a merge join request:
   <OPTGUIDELINES>
     <MSJOIN>
       <NLJOIN>
         <IXSCAN TABLE='"Samp".Parts'/>
         <IXSCAN TABLE="PS"/>
       </NLJOIN>
       <IXSCAN TABLE='S'/>
     </MSJOIN>
   </OPTGUIDELINES>