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.

You can also use Visual Explain:<br />

► To generate customized reports on explicable statements<br />

► To view subsystem parameters<br />

► To view data from the plan table, statement table, and function table<br />

► To list SQL statements stored in the catalog (SYSSTMT and SYSPACKSTMT)<br />

Note: All these functions can be executed with a click in the corresponding icon in the<br />

Visual Explain icon bar.<br />

You can link to these suggestions directly from the graph. You can also link from the graph to<br />

additional statistics and descriptions <strong>for</strong> each object or operation that is used in the access<br />

plan.<br />

Each graph can display multiple query blocks, so that you can view the entire access plan in<br />

one graph. In previous versions of Visual Explain, each graph displayed only one query block.<br />

In this version, you still have the option to view only one query block at a time. You can use<br />

Visual Explain to catalog and uncatalog databases on your local machine, to list DSNZPARM<br />

parameters by installation field name, alphabetically by parameter name, or by installation<br />

panel name. You maintain Visual Explain by deleting old records from the EXPLAIN tables.<br />

With <strong>DB2</strong> V8 Visual Explain, you can save the access path graph <strong>for</strong> later use, because<br />

Visual Explain uses XML to store the graph in<strong>for</strong>mation. Every time that you EXPLAIN a<br />

statement, the access path graph is displayed on the Access Plan page of the Tune SQL<br />

notebook. On this page, select File → Save XML File to save the XML file to your local work<br />

station. To retrieve the graph, select File → Open XML File. You can also send the XML file to<br />

other people. If they have <strong>DB2</strong> Visual Explain installed, they can also see the graph.<br />

Note: Visual Explain has enhanced capabilities related to qualified rows estimates. It<br />

provides a wealth of predicate in<strong>for</strong>mation, more partition scan in<strong>for</strong>mation, and parallelism<br />

details.<br />

Visual Explain uses some sample stored procedures:<br />

► DSNWZP<br />

This stored procedure is required to support the Browse Subsystems Parameters function.<br />

The stored procedure is also used by Service SQL <strong>for</strong> collection and transmission of<br />

subsystem parameter settings to <strong>IBM</strong> service.<br />

► DSN8EXP<br />

This stored procedure (see also APARs PQ90022 and PQ93821) supports the EXPLAIN with<br />

stored procedure option. The purpose of EXPLAIN with stored procedure is to allow you to<br />

EXPLAIN SQL against objects against which you do not have the authority to execute<br />

queries. For example, a developer may have responsibilities <strong>for</strong> SQL per<strong>for</strong>mance on a payroll<br />

application, but may not have SELECT, INSERT, UPDATE, and DELETE access to the object.<br />

The developer can use the stored procedure to execute the Explain against the object. The<br />

developer does not need access to the objects, but the authority to execute the stored<br />

procedure.<br />

► DSNUTILS<br />

Statistics Advisor generates RUNSTATS statements. These RUNSTATS statements can be<br />

executed dynamically if you have a license to execute RUNSTATS, the DSNUTILS stored<br />

procedure is installed, and you have appropriate authority to execute the RUNSTATS<br />

Chapter 3. SQL per<strong>for</strong>mance 111

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

Saved successfully!

Ooh no, something went wrong!