Index scan access requests
The IXSCAN access request element can be used to specify that the optimizer is to use an index scan to access a local table. It is defined by the complex type indexScanType.
XML Schema
<xs:complexType name="indexScanType">
<xs:complexContent>
<xs:extension base="accessType">
<xs:attribute name="INDEX" type="xs:string" use="optional"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
Description
The complex type indexScanType
extends the abstract accessType by adding an optional INDEX attribute.
The INDEX attribute specifies the unqualified name of the index that is to be
used to access the table.
- If the index scan access method is not in the search space that is in effect for the statement, the access request is ignored and SQL0437W with reason code 13 is returned.
- If the INDEX attribute is specified, it must identify an index defined on the table that is identified by the TABLE or TABID attribute. If the index does not exist, the access request is ignored and SQL0437W with reason code 13 is returned.
- If the INDEX attribute is not specified, the optimizer chooses an index in a cost-based fashion. If no indexes are defined on the target table, the access request is ignored and SQL0437W with reason code 13 is returned.
The following guideline is an example
of an index scan access request:
<OPTGUIDELINES>
<IXSCAN TABLE='S' INDEX='I_SUPPKEY'/>
</OPTGUIDELINES>