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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

An auxiliary node includes any nodes that are neither data source nodes nor operator<br />

nodes.<br />

Both query nodes and query block nodes are classified as auxiliary nodes. Most of the nodes<br />

have corresponding descriptors, which store detailed in<strong>for</strong>mation about the data source,<br />

query, or operation that is represented by the node. The Descriptor window lists all of the<br />

attribute values <strong>for</strong> the data source, query, or operation that is represented by the node. From<br />

the Descriptor window, you can also link to any related descriptors. For example, from the<br />

descriptor <strong>for</strong> a table node, you can link to the descriptors <strong>for</strong> the indexes that are defined on<br />

that table.<br />

We use the consistency query 31, listed in Appendix 3-11, “Old consistency query 31” on<br />

page 113 to show an example of the EXPLAIN.<br />

Table 3-11 Old consistency query 31<br />

The old Query 31<br />

SELECT NAME<br />

FROM SYS<strong>IBM</strong>.SYSPLAN PL<br />

WHERE PLENTRIES = 0<br />

AND NOT EXISTS<br />

(SELECT * FROM SYS<strong>IBM</strong>.SYSDBRM WHERE PLNAME = PL.NAME);<br />

This query with correlated subquery selects the names of plans that have PLENTRIES=0 and<br />

have no DBRM pointing to the name of the plan. If you want more in<strong>for</strong>mation about the<br />

consistency query, take a look at 9.5, “Catalog consistency query DSNTESQ” on page 359.<br />

There you find some measurements and more details about it.<br />

Now let us analyze the Visual Explain from the Query 31. Figure 3-47 shows the EXPLAIN<br />

and tells us that the cost of CPU is 2 milliseconds (in service units the cost is 32).<br />

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

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

Saved successfully!

Ooh no, something went wrong!