Enhancement For Users of DB2 EXPLAIN

(Originally posted 2006-02-22.)

APAR PK15454 documents an extension to DB2’s EXPLAIN function which makes correlation of the various tables involved much easier. This enhancement is used by Visual Explain but can also be used by people querying the tables EXPLAIN produces, in particular DSN_FILTER_TABLE and DSN_PREDICAT_TABLE.</p.

When you EXPLAIN a statement it produces rows in the well-known PLAN_TABLE table, but also in these other two tables (and some other lesser-known tables).

To quote from the APAR description a number of problems were fixed…

  1. When an access path uses multiple index access, the output to DSN_FILTER_TABLE is ambiguous because the sequence number of a step in a multiple index operation is not available.
  2. For an INSERT within SELECT statement, in DSN_PREDICAT_TABLE the TABNO can be ambiguous between the select and insert part of the statement.
  3. The LITERALS column in DSN_PREDICAT_TABLE does not display SMALLINT properly.
  4. Slow performance when running Explain on a query and DSN_DETCOST_TABLE is defined.

Published by Martin Packer

.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: