DB2 does not exist in the explain table of the SQL Execution Plan by default. Therefore, you need to create an explain table as needed during use. How can you create it? In fact, DB2 still provides a variety of methods for you to use. The first method is to use the script EXPLAIN. DDL by default, which is created in the following path of the database by default:
C: \ Program Files (x86) \ IBM \ SQLLIB \ MISC> ls
DB2AutoBackupPolicy. xsd DB2EvmonPkgCache. xsd DB2MonRoutines. xsd DB2SchemaAnnotation. xsl db2adminV8.exe db2uext2. v2
DB2AutoReorgPolicy. xsd DB2EvmonUOW. xsd DB2OptProfile. xsd EXPLAIN. DDL db2audit. ddl wlmevmon. ddl
DB2AutoRunstatsPolicy. xsd DB2MaintenanceWindowPolicy. xsd DB2PolicyLang. xsd db2InstallReg.exe db2ckupgrade.exe
DB2EvmonLocking. xsd DB2MonCommon. xsd DB2RecommendationSchema. xsd db2InstallReg.txt db2hdr.exe
Therefore, you only need to connect to the specified database and execute the file to create the explain table,
Db2 connect to sample
Db2-tvf EXPLAIN. DDL
The table can be created successfully. The default table schema is the current user schema.
However, this requires related files, or you can directly create them using the following SP:
Db2 connect to sample
Db2 "call sysproc. SYSINSTALLOBJECTS ('explain ', 'C', NULL, 'db2inst1 ')"
In this way, specify Schmma to create an explain table, and then analyze the SQL Execution Plan.
DB2 database performance adjustment and optimization (1st and 2) PDF
DB2 database performance optimization
DB2 9.7 for Linux 5.4 Installation Steps
This article permanently updates the link address: