Access Sub-Clauses
An access sub-clause is a sub-clause that references one column in one table or two columns in two tables, and at least one referenced column has to be an index column (see Index Columns). The Query Processor uses the access sub-clauses to determine the access paths for your query (see Access Path).
During the Determine Sub-Clause Type phase of the optimization algorithm, the Query Processor identifies the access sub-clauses in your query. To do this, it looks for sub-clauses that have the following characteristics:
Either:
- A sub-clause that references one index column in one table
or
- A sub-clause that references two columns in two tables, with at least one of the columns being an index column, takes one of the following forms:
- TableA.Column = Value1
- TableA.Column = Value1 OR TableA.Column = Value2 OR ...
- TableA.Column1 = TableB.Column2
Where:
- ‘TableA’ and ‘TableB’ are references to different tables
- ‘Value1’ and ‘Value2’ are constant expressions
- ‘Column’, ‘Column1’, and ‘Column2’ are references to columns
- ‘OR...’indicates that in a real SQL Query, there may be further OR conditions of the form TableA.Column = Value.
When the Query Processor has identified the access sub-clauses in your query, it adds them to an internal list. The Query Processor refers to this list in a later stage of the optimization algorithm (it uses the access sub-clauses in its calculations to determine the access plan for your query).
Further Information