If Visual Explain is installed on your workstation, you can examine the
contents of an explain snapshot.
An explain snapshot is compressed information that is collected
when an SQL statement is explained. It is stored as a binary large
object (BLOB) in the EXPLAIN_STATEMENT table, and contains the following
information:
- The internal representation of the access plan, including its operators
and the tables and indexes accessed
- The decision criteria used by the optimizer, including statistics for
database objects and the cumulative cost for each operation.
An explain snapshot is required if you want to display the graphical
representation of an SQL statement's access plan. To ensure that
an explain snapshot is created:
- Explain tables must exist in the database manager to store the explain
snapshots. For information on how to create these tables, see Creating explain tables.
- For a package containing static SQL statements, set the EXPLSNAP option to
ALL or YES when you bind or prep the package. You will get an explain
snapshot for each explainable SQL statement in the package. For more
information on the BIND and PREP commands,
see
the Command Reference.
- For dynamic SQL statements, set the EXPLSNAP option to ALL when you bind
the application that issues them, or set the CURRENT EXPLAIN SNAPSHOT special
register to YES or EXPLAIN before you issue them interactively. For
more information,
see
the section on current explain snapshots in the SQL
Reference.
[ Top of Page |
Table of Contents |
Glossary |
Index ]
[ DB2 List of Books |
Search the DB2 Books ]