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