Chapter 5. Capacity planning in an existing DB2 II environment 383
DB20000I The UPDATE DATABASE MANAGER CONFIGURATION command completed
successfully.
2. Create the EXPLAIN tables.
First create a user for the performance warehouse, and then create the
EXPLAIN tables for that user’s schema. The EXPLAIN tables are created
using the EXPLAIN.DDL script in the $HOME/sqllib/misc/ directory, as
shown in Example 5-2, where $HOME is the DB2/II instance owner's home
directory. On Windows, the EXPLAIN.DDL script can be found in c:\Program
files\IBM\SQLLIB\misc. EXPLAIN tables are used for determining the
relationship between the user query and remote SQL fragments found in the
dynamic cache.
Example 5-2 Create the EXPLAIN tables
$db2 -tvf $HOME/sqllib/misc/EXPLAIN.DDL
3. Create the performance warehouse tables.
There are a number of tables to be created in the performance warehouse, as
shown in Example 5-3 on page 384.
– CREATE SEQUENCE FEDWH.GENSNAPID creates a sequence of name
FEDWH.GENSNAPID. It is used in generating keys for the start and end of
a monitoring interval.
– FEDWH.FEDWH_INSTANCE table that contains the average memory
utilization, maximum connections, operating system recorded CPU (via
sar command), and the computed capture ratio during each monitored
interval.
– FEDWH.FEDWH_SNAPSHOT_DYN_SQL table containing the snapshot
of dynamic cache with an additional “SNAPID” column.
– FEDWH.FEDWH_EXPLAIN_INSTANCE table that stores the relationship
between the explain table contents and the snapshot interval.
– FEDWH.FEDWH_SNAPSHOT_DYN_SQL_INTERVAL table containing
metrics of the dynamic cache for a particular monitoring interval.
– FEDWH.FEDWH_FEDSQL_INTERVAL table containing combined metrics
of the dynamic cache and explain table contents for each query in a
particular monitoring interval.
Note: The EXPLAIN.DDL script file creates EXPLAIN tables in the default
user table space (usually USERSPACE1 if the defaults were taken when
the database was created). You should modify this script to create the
EXPLAIN tables in the desired table space.