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.

Figure 3-29 Access path graph in Visual Explain<br />

If we click the rectangle indicating (4)SYSTABLESPACE in the graph, it shows that<br />

SYSTABLESPACE has 828 rows and it is estimated that approximately 794 rows of the table<br />

qualify in the table space scan.<br />

On the left side of the graph there is one tree structure that shows in<strong>for</strong>mation about the<br />

columns, indexes and table space related to the selected table SYSTABLESPACE. If there is<br />

a frequency distribution on one column of the table, under the respective column there is a<br />

Coldist folder. If you select i, you can see the values of the column and the filtering factor <strong>for</strong><br />

the value.<br />

For each qualified row in the outer table, the subquery is executed using a matching index<br />

scan using predicate TB.DBNAME=TS.DBNAME with filtering factor of 0.0098 returning 18<br />

RIDs.<br />

The report function generates in<strong>for</strong>mation about the cardinalities used. If there are no<br />

statistics available, default cardinality is used by the optimizer.<br />

Example 3-7 shows the RUNSTATS statement given by the Statistics Advisor of Visual<br />

Explain <strong>for</strong> the query in Example 3-6 after the execution of the analyze function. Visual<br />

Explain enhancements are reported in 3.15, “Visual Explain” on page 110.<br />

Example 3-7 RUNSTATS statement provided by the Statistics Advisor<br />

RUNSTATS TABLESPACE DSNDB06.SYSDBASE<br />

TABLE(SYS<strong>IBM</strong>.SYSTABLESPACE)<br />

COLUMN(NAME)<br />

TABLE(SYS<strong>IBM</strong>.SYSTABLES)<br />

COLUMN(TYPE,TSNAME)<br />

COLGROUP(TYPE) FREQVAL COUNT 10<br />

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

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

Saved successfully!

Ooh no, something went wrong!