Explain SQL statements


In 

Some content is unavailable due to permissions.

, running an Explain job explains the steps that the Db2 optimizer must take to execute the relevant SQL statements.

You can run an Explain job to see an explanation of any of the following types of statements:

  • All explainable SQL statements in a plan or package
  • SQL statements stored outside the Db2 catalog (referred to as a DBRM library Explain or DBRMLIB Explain)
  • A single SQL statement (online or in batch mode)

The Explain option includes the cost and filter factor for each process step of the SQL statement. This capability enables the DBA or developer to determine quickly which part of the query is estimated to consume the most resources.


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*