IBM Books

Administration Guide

db2exfmt - Explain Table Format Tool

You use the db2exfmt tool to format the contents of the explain tables. This tool is located in the misc subdirectory of the instance sqllib directory.

To use the tool, you requre read access to the explain tables being formatted.

              '--d--dbname--'  '--e--schema--'  '--f--O--'
   |     .-------.  |  '--l--'  '--n--name--'  '--s--schema--'
   |     V       |  |
   +--o--outfile--+ '--w--timestamp--'  '--#--sectnbr--'
   | .--t-.       |

-d dbname
Name of the database containing packages.
-e schema
Explain table schema.
Formatting flags. In this release, the only supported value is O (operator summary).
Graph plan. If only -g is specified, a graph, followed by formatted information for all of the tables, is generated. Otherwise, any combination of the following valid values can be specified:
Generate a graph only. Do not format the table contents.
Include total cost under each operator in the graph.
Include I/O cost under each operator in the graph.
Include the expected output cardinality (number of tuples) of each operator in the graph.
Respect case when processing package names.
-n name
Name of the source of the explain request (SOURCE_NAME).
-s schema
Schema or qualifier of the source of the explain request (SOURCE_SCHEMA).
-o outfile
Output file name.
Direct the output to the terminal.
-w timestamp
Explain time stamp. Specify -1 to obtain the latest explain request.
-# sectnbr
Section number in the source. To request all sections, specify zero.
Display help information. When this option is specified, all other options are ignored, and only the help information is displayed.

You will be prompted for any parameter values that are not supplied, or that are incompletely specified, except in the case of the -h and the -l options.

If an explain table schema is not provided, the value of the environment variable USER is used as the default. If this variable is not found, the user is prompted for an explain table schema.

Source name, source schema, and explain time stamp can be supplied in LIKE predicate form, which allows the percent sign (%) and the underscore (_) to be used as pattern matching characters to select multiple sources with one invocation. For the latest explained statement, the explain time can be specified as -1.

If -o is specified without a file name, and -t is not specified, the user is prompted for a file name (the default name is db2exfmt.out). If neither -o nor -t is specified, the user is prompted for a file name (the default option is terminal output). If -o and -t are both specified, the output is directed to the terminal.

[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]