DB2 Optimization Foundation Open explain

Source: Internet
Author: User
Tags db2

EXPLAIN as a DB2 query plan, generally need to open their own, but generally run DB2-TVF EXPLAIN. DDL but I've been running a lot of times and it's been wrong.


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

It should be written like this: DB2-TVF "C:\Program Files (x86) \ibm\sqllib\misc\explain. DDL "

EXPLAIN. The default directory for DDL is under C:\Program Files (x86) \ibm\sqllib\misc\, and there is an error in the same directory.

But sometimes there will be errors, actually this sentence executes a lot of SQL, creating a lot of tables. If you find a problem, you can delete the corresponding table and index.


Deletes the corresponding table index, attempting to

DB2 Drop TABLE explain_actuals
db2 drop FUNCTION explain_get_msgs
DB2 DROP INDEX PRT_I1
DB2 DROP INDEX mqt_i2< C3/>DB2 DROP index MQT_I1 on ADVISE_MQT
DB2 DROP INDEX IDX_I2
DB2 DROP INDEX IDX_I1
DB2 DROP INDEX Exp_diag_da T_I1
DB2 DROP INDEX OBJ_I1
DB2 DROP INDEX STM_I1
DB2 DROP INDEX PRD_I1
DB2 DROP INDEX ARG_I1
DB2 DRO P INDEX stmt_i1
DB2 drop table advise_table
DB2 drop table advise_partition
DB2 drop table advise_mqt
  
   DB2 drop table Advise_workload
DB2 drop table Advise_index
DB2 drop table advise_instance 
DB2 drop table O Bject_metrics 
DB2 drop table Explain_diagnostic_data
DB2 drop table explain_diagnostic
DB2 drop table Explain_stream
DB2 drop table explain_predicate
DB2 drop table Explain_operator
DB2 drop table Explain_ OBJECT
DB2 drop table explain_argument
DB2 drop table explain_statement
DB2 drop table Explain_instance
  


Re-create the corresponding table index, view

DB2-TVF "C:\Program Files (x86) \ibm\sqllib\misc\explain. DDL ">d:\22.txt



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.