Db2 optimization basics open EXPLAIN

Source: Internet
Author: User

Db2 optimization basics open EXPLAIN

As a db2 query plan, EXPLAIN needs to be opened by myself. However, it generally runs db2-tvf EXPLAIN. DDL, but it is wrong to run it many times.

Because it is not in the same directory, there will be errors.

It should be written as follows: db2-tvf "C: \ Program Files (x86) \ IBM \ SQLLIB \ MISC \ EXPLAIN. DDL"

The default directory of EXPLAIN. DDL is in C: \ Program Files (x86) \ IBM \ SQLLIB \ MISC \. If it is not in the same directory, an error occurs.

But sometimes there are still errors. In fact, this sentence executes a lot of SQL statements and creates many tables. If any problem is found, you can delete the corresponding table and index.


Explain "brush: SQL; "> db2 drop TABLE comment drop FUNCTION comment drop INDEX PRT_I1db2 drop INDEX MQT_I2db2 drop INDEX MQT_I1 on comment drop INDEX IDX_I2db2 drop INDEX IDX_I1db2 drop INDEX comment _i1db2 drop INDEX PRD_I1db2 drop INDEX ARG_I1db2 drop INDEX comment drop TABLE ADVISE_TABLEdb2 drop TABLE comment drop TABLE ADVISE_WORKLOADdb2 drop TABLE ADVISE_INDEXdb2 drop TABLE ADVISE_INSTANCE db2 drop TABLE OBJECT_METRICS db2 drop TABLE comment drop TABLE EXPLAIN_STREAMdb2 drop TABLE comment drop TABLE EXPLAIN_OPERATORdb2 drop TABLE EXPLAIN_OBJECTdb2 drop TABLE EXPLAIN_ARGUMENTdb2 drop TABLE EXPLAIN_STATEMENTdb2 drop TABLE EXPLAIN_INSTANCE

Re-create the corresponding table index and view

Db2-tvf "C: \ Program Files (x86) \ IBM \ SQLLIB \ MISC \ EXPLAIN. DDL"> d: \ 22.txt



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.