DB2 SQL Execution Plan monitoring is an important part of DB2 database monitoring. Let's take a look at what is DB2 SQL Execution Plan monitoring.
Static SQL Execution plans are stored in the system's catalog table, and dynamic SQL Execution plans are stored in the global package cache.
If you want to use the explain tool, you must first create the relevant tables. The table creation script is in/misc/EXPLAIN. DDL. If you have run the explain GUI tool once, these tables will be automatically created.
Explain specific Registrar type:
Current explain mode-Used to populate only the explain data. No snapshot will be taken.
Current explain snapshot-Used to capture only the explain snapshot data.
Set the type of the specific register of the explain:
Set current explain mode option
Set current explain snapshot option
The explain registers options are:
NO-No explain information is captured for dynamic SQL statements.
YES-Explain tables or snapshot information will be populated for dynamic SQL statements while executing the SQL statement, and the result is returned.
EXPLAIN-Explain tables or snapshot information will be populated for dynamic SQL statements without executing the SQL statement. Use this state to obtain explain information without executing the SQL statement.
Implementation Process of batch execution of DB2 SQL scripts
DB2 Online Export Method
Common db2 stored procedure statements
Usage of the DB2 create server statement
Common DB2 management commands