The result of the EXPLAIN statement is a table that consists of multiple columns. The STRATEGY column displays the search strategy used by the Optimizer for the SQL statement. The list of all search strategies shows you the various strategies, together with explanations.
As well as the search strategy, the Optimizer can also display the following information in the STRATEGY column:
Note |
Meaning |
ONLY INDEX ACCESSED |
Only the specified index is used to process the SQL statement; the data in the basis table is not accessed. This is possible only if the SQL statement addresses only those columns that are included in the index structure. |
DISTINCT OPTIMIZATION (A) |
The complete key is included in the SELECT list/output columns. This means that the result is automatically free from duplicates. |
DISTINCT OPTIMIZATION (C) |
Complete secondary key SELECT DISTINCT <all_columns_of_index> FROM ... |
DISTINCT OPTIMIZATION (P) |
Partial secondary key SELECT DISTINCT <first_k_columns_of_index> FROM ... |
DISTINCT OPTIMIZATION (K) |
Primary key SELECT DISTINCT <all_columns_of_index_+_first_k_columns_of_key> FROM ... |
TEMPORARY INDEX CREATED |
A temporary index is created internally, in which the keys of the hit rows determined by the corresponding index columns are stored in ascending order. The system accesses the basis table using this temporary index. |
ADDNL. QUALIFICATION ON INDEX |
There are search conditions for index or key columns that cannot be used for the direct containment of the range for accessing an index (for example, in the case of an equality /IN condition, for the first and third columns of a multi-column index, only the first search condition of the search strategy is used for accessing the index). The usage of these search conditions for restricting access to the basis table makes them part of the corresponding index strategy |
For more information on the structure of the results table, see the Reference Manual under EXPLAIN Statement.