有些时候会提示让你加上表的模式名,假设你的模式名是:schema:
db2 reorg table schema.mytab
这个方法对于runstats也是适用的。
visual explain A graphical tool available in the db2 Command Center (or Control Center) - to examine single queries, whether static or dynamic. Shows a color-coded tree. Clicking on a node allows you to view the arguments, statistics, and cost estimate of the node. You can also jump directly to DB2's documentation on that node type. Visual Explain can also be run from the command line as db2vexp.exe, though it then lacks static SQL ability.
db2expln The "bare bones" tool, giving text output from static SQL packages only. This can optionally include a character mode graph.
dynexpln Gives a text-mode analysis of a dynamic SQL query. It actually packages the dynamic query and calls db2expln to do the work. From unix command line invoke it as:
dynexpln -d mydb -f test.sql
dynexpln -h
db2exfmt A formatter for previously stored explain data.
执行计划查看工具:
db2vexp.exe db2自带的图形化执行计划查看工具
db2expln 文本输出的静态SQL执行计划查看工具
dynexpln 文本输出的动态SQL查询计划
dynexpln -d mydb -f test.sql
dynexpln -h
db2exfmt 前面其它工具获得的执行计划格式化工具