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_actualsdb2 drop FUNCTION explain_get_msgsdb2 DROP index prt_i1db2 DROP index MQT_I2DB2 DROP index M QT_I1 on ADVISE_MQTDB2 DROP index IDX_I2DB2 DROP index IDX_I1DB2 DROP index EXP_DIAG_DAT_I1DB2 DROP index OBJ_I1DB2 drop I Ndex stm_i1db2 DROP Index prd_i1db2 DROP index ARG_I1DB2 DROP index stmt_i1db2 drop table advise_tabledb2 drop table Advis E_PARTITIONDB2 drop table advise_mqtdb2 drop table advise_workloaddb2 drop table advise_indexdb2 drop table Advise_instanc E DB2 drop TABLE object_metrics DB2 drop table explain_diagnostic_datadb2 drop table explain_diagnosticdb2 drop table Expl AIN_STREAMDB2 drop table explain_predicatedb2 drop table explain_operatordb2 drop table explain_objectdb2 drop table Expla IN_ARGUMENTDB2 drop table explain_statementdb2 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
DB2 Optimization Foundation Open explain