The following articles mainly describe the specific usage instructions of the DB2 execution plan display tool. If you are interested in the specific usage instructions of the DB2 execution plan display tool, you can click to view the following articles. The following is a detailed description of the articles. I hope you can learn from them.
Tools
DB2 has a graphical execution plan display tool. If there is no graphical environment, such as a unix host, you can generate a text file to display the execution plan.
1. If the first execution is performed, connect to dbname first,
Run DB2-tvf $ HOME/sqllib/misc/EXPLAIN. DDL to create an execution schedule
2.
- DB2 set current explain mode explain
Set to interpretation mode, and do not really execute the following SQL command
3.
- DB2 \"select count(*) from staff\"
Execute the SQL statement you want to analyze
4.
- DB2 set current explain mode no
Cancel interpretation mode
5.
- DB2exfmt -d sample -g TIC -w -l -s % -n % -o DB2exmt.out
Execution Plan output to file DB2exmt. out
The above content is an introduction to the usage instructions of the DB2 execution plan display tool. I hope you will have some gains.