19.06.2013 Views

DB2 UDB for z/OS Version 8 Performance Topics - IBM Redbooks

DB2 UDB for z/OS Version 8 Performance Topics - IBM Redbooks

DB2 UDB for z/OS Version 8 Performance Topics - IBM Redbooks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Note: If you want to empty the PLAN_TABLE, you must use the DELETE statement, just<br />

as you would <strong>for</strong> deleting rows from any table. You also can use the DROP TABLE<br />

statement to drop the PLAN_TABLE completely. The action of binding, rebinding or<br />

executing another SQL statement does not replace or delete rows from the PLAN_TABLE.<br />

D.1.1 DSN_PLAN_TABLE<br />

The table can be created by the statements contained in member name DSNTESC of the<br />

<strong>DB2</strong> sample library. <strong>DB2</strong> tools also create or update your PLAN_TABLE when needed.<br />

Let us look at the evolution of the PLAN_TABLE in Table D-1.It is a way to see the evolution of<br />

<strong>DB2</strong>.<br />

Table D-1 PLAN_TABLE columns by release<br />

<strong>DB2</strong> release Columns in<br />

PLAN_TABLE<br />

V1 25<br />

V1R2 28<br />

V2 30<br />

V3 34<br />

V4 43<br />

V5 46<br />

V6 49<br />

V7 51<br />

V8 58<br />

Note: When you execute EXPLAIN using <strong>DB2</strong> Per<strong>for</strong>mance Expert in V8 <strong>for</strong> the first time,<br />

<strong>DB2</strong> PE advises you that your PLAN_TABLE is old and updates it <strong>for</strong> you.<br />

Of course, the 58-column <strong>for</strong>mat gives you the most in<strong>for</strong>mation. If you alter an existing<br />

PLAN_TABLE to add new columns, in general specify the columns as NOT NULL WITH<br />

DEFAULT, so that default values are included <strong>for</strong> the rows already in the table. However, as<br />

you can see in Table D-2, there are some exceptions, certain columns do allow nulls. Do not<br />

specify those columns as NOT NULL WITH DEFAULT.<br />

Table D-2 describes the PLAN_TABLE, giving a small description of each column and a brief<br />

history of <strong>DB2</strong> evolution. If you want more in<strong>for</strong>mation about it, refer to <strong>DB2</strong> <strong>UDB</strong> <strong>for</strong> z/<strong>OS</strong><br />

<strong>Version</strong> 8 Administration Guide, SC18-7413.<br />

Note: There are some objects <strong>for</strong> which accesses are not described by EXPLAIN. They<br />

are, <strong>for</strong> example, the access to LOB values, which are stored separately from the base<br />

table, and access to parent or dependent tables needed to en<strong>for</strong>ce referential constraints,<br />

SQL <strong>for</strong> routines (triggers, functions, or stored procedures), and explicit access to<br />

SECLABELs <strong>for</strong> row level security.<br />

Appendix D. EXPLAIN and its tables 409

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!