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

I'm a mainframe performance guy and have been for the past 35 years. But I play with lots of other technologies as well.

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 )

Facebook photo

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

Connecting to %s

%d bloggers like this: