Troubleshooting optimization guidelines and profiles
Diagnostics support for optimization guidelines (passed by optimization profiles) is provided by EXPLAIN tables.
You will receive an SQL0437W warning with reason
code 13 if the optimizer does not apply an optimization guideline.
Diagnostic information detailing why an optimization guideline was
not applied is added to the EXPLAIN tables. There are two EXPLAIN
tables for receiving optimizer diagnostic output:
- EXPLAIN_DIAGNOSTIC - Each entry in this table represents a diagnostic message pertaining to the optimization of a particular statement. Each diagnostic message is represented using a numeric code.
- EXPLAIN_DIAGNOSTIC_DATA - Each entry in this table is diagnostic data relating to a particular diagnostic message in the EXPLAIN_DIAGNOSTIC table.
The following steps can help you troubleshoot problems that occur
when you are using optimization guidelines:
- Verify that optimization guidelines have been used.
- Examine the full error message using the built-in EXPLAIN_GET_MSGS table function.
If you finish these steps but cannot yet identify the source of the problem, begin collecting diagnostic data and consider contacting IBM Software Support.
This DDL is included in the EXPLAIN.DDL file located in the misc subdirectory of the sqllib directory.