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.

3.15.1 Installation<br />

commands. Of course, the RUNSTATS input can also be copied into a batch job and executed<br />

outside of Statistics Advisor.<br />

Installing the Java Universal Driver on <strong>DB2</strong> V8 provides Visual Explain with the stored<br />

procedures used by Visual Explain. See APAR PQ62695. Additionally, the stored procedure<br />

SYS<strong>IBM</strong>.SQLCAMESSAGE is installed. This provides error message descriptions <strong>for</strong> SQL<br />

errors in Visual Explain. For more in<strong>for</strong>mation, see the book <strong>DB2</strong> <strong>for</strong> z/<strong>OS</strong> and <strong>OS</strong>/390:<br />

Ready <strong>for</strong> Java, SG24-6435.<br />

Visual Explain is available <strong>for</strong> download from the Web site:<br />

http://www.ibm.com/software/data/db2/zos/osc/ve/index.html<br />

It is also part of the <strong>DB2</strong> Management Client Package (no charge feature of <strong>DB2</strong>) on a<br />

CD-ROM. After the install, you need to set up a JDBC connection. You can do so by using the<br />

restricted-use copy of <strong>DB2</strong> Connect Personal Edition V8 <strong>for</strong> Windows which is provided with<br />

the Management Client Package.<br />

Instead of using the Configuration Assistant tool that comes with <strong>DB2</strong> Connect, you can set<br />

up your connection via Visual Explain. Make sure the <strong>DB2</strong> Connect packages have been<br />

previously bound on your target <strong>DB2</strong> system. If you are using a TCP/IP connection to the<br />

host, you need to have the port number from your subsystem. The configuration is very<br />

simple and straight<strong>for</strong>ward and all required in<strong>for</strong>mation can be entered on a single window.<br />

Visual Explain has a Help function which describes its features. For more details on the<br />

results provided by Visual Explain, and <strong>for</strong> more in<strong>for</strong>mation on how to use it, refer to section<br />

10.19, Visual Explain enhancements of <strong>DB2</strong> <strong>UDB</strong> <strong>for</strong> z/<strong>OS</strong> <strong>Version</strong> 8: Everything You Ever<br />

Wanted to Know,... and More, SG24-6079.<br />

Note: When you run Visual Explain <strong>for</strong> the first time, Visual Explain tells you if you do not<br />

have the following tables: DSN_STATEMNT_TABLE, PLAN_TABLE,<br />

DSN_DETC<strong>OS</strong>T_TABLE, DSN_PREDICAT_TABLE, DSN_STRUCT_TABLE,<br />

DSN_FILTER_TABLE, DSN_SORT_TABLE, DSN_SORTKEY_TABLE,<br />

DSN_PGROUP_TABLE, DSN_PTASK_TABLE, DSN_PGRANGE_TABLE.<br />

And if you do not have them, Visual Explain creates them <strong>for</strong> you.<br />

3.15.2 Visual Explain consistency query analysis<br />

As an example, we are going to use Visual Explain to EXPLAIN one of the queries used <strong>for</strong><br />

catalog consistency checking. These queries are shipped in SDSNSAMP(DSNTESQ) to help<br />

you evaluate the health of your <strong>DB2</strong> catalog.<br />

But first we describe the access plan graph. This graph can contain three types of nodes:<br />

► Data source nodes<br />

A data source node represents a physical data store in the database, such as a table or<br />

index.<br />

► Operator nodes<br />

An operator node indicates an operation, such as a nested loop join, that is per<strong>for</strong>med on<br />

the data source, or on the result of a previous operation<br />

► Auxiliary nodes<br />

112 <strong>DB2</strong> <strong>UDB</strong> <strong>for</strong> z/<strong>OS</strong> <strong>Version</strong> 8 Per<strong>for</strong>mance <strong>Topics</strong>

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

Saved successfully!

Ooh no, something went wrong!