1.

What are the steps that you need to execute to generate a detailed report containing all of the explain data?

Answer»

If you want to GENERATE a detailed report containing all of the explain data, you can execute the db2exfmt command in a sequence shown as follows:

Enable the Explain FACILITY by setting the current explain mode to EXPLAIN

This will configure the CURRENT EXPLAIN MODE special REGISTER so that the EXPLAIN the facility can capture the explain information without executing the SQL statement:

1. SET CURRENT EXPLAIN MODE EXPLAIN;

2. Run the actual SQL statement in the same SESSION:

     db2 -tvf employee.ddl > employee.log

3. Disable the Explain facility by setting the current explain mode to NO:

     SET CURRENT EXPLAIN MODE NO

4. Run the db2exfmt tool:

    db2exfmt -d SAMPLE -g TIC -w -1 -s % -n % -# 0 -o employee.db2exfmt.out



Discussion

No Comment Found