Detailed description of the use of the DB2 execution plan display tool

Source: Internet
Author: User

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.

 
 
  1. DB2 set current explain mode explain 

Set to interpretation mode, and do not really execute the following SQL command

3.

 
 
  1. DB2 \"select count(*) from staff\" 

Execute the SQL statement you want to analyze

4.

 
 
  1. DB2 set current explain mode no 

Cancel interpretation mode

5.

 
 
  1. 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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.