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.

6.4.4 Per<strong>for</strong>mance<br />

► ST01WKnn: You need to specify the data set name <strong>for</strong> the temporary data sets of sort<br />

input and output when collecting statistics on at least one data-partitioned secondary<br />

index.<br />

► STATWKnn: You need to specify the data set name <strong>for</strong> the temporary data sets of sort<br />

input and output when collecting distribution statistics <strong>for</strong> column groups.<br />

Note: To calculate the approximate size (in bytes) of the ST01WKnn data set, use the<br />

following <strong>for</strong>mula:<br />

2 × (maximum record length × numcols × (count + 2) × number of indexes)<br />

The values in the <strong>for</strong>mula are as follows:<br />

► Maximum record length: The maximum length of the SYSCOLDISTATS record on<br />

which RUNSTATS is to collect frequency statistics. You can obtain this value from the<br />

RECLENGTH column in SYSTABLES.<br />

► Numcols: The number of key columns to concatenate when you collect frequent values<br />

from the specified index.<br />

► Count: The number of frequent values that RUNSTATS is to collect.<br />

When you plan to use distribution statistics, make sure that the following maintenance is<br />

applied <strong>for</strong> correct functionality and good per<strong>for</strong>mance:<br />

► PTF UQ88754 <strong>for</strong> APAR PQ88375 provides the right value of cardinality <strong>for</strong> partitioned<br />

table spaces.<br />

► PTF UQ91099 <strong>for</strong> APAR PQ87509 is required <strong>for</strong> correctness of frequency values.<br />

► PTF UQ93177 <strong>for</strong> APAR PQ90884 is required <strong>for</strong> better (200%) per<strong>for</strong>mance.<br />

DSTATS per<strong>for</strong>mance comparison of V7 and V8 with PQ90884<br />

In this test we first run RUNSTATS in V7 followed by the standalone DSTATS tool. We<br />

measure class 1 elapsed and CPU time and get the total time of both. In the second case we<br />

measure V8 RUNSTATS with distribution statistics where we collect equivalent statistics to<br />

those taken in V7 with the DSTATS tool. Be<strong>for</strong>e running this case we have applied the PTF <strong>for</strong><br />

PQ90884.<br />

We use an internal query workload and the test table contains about 931k rows. The<br />

description of the test environment is:<br />

► <strong>DB2</strong> V7 and V8 (non-data sharing)<br />

► Table: 1 test table in 1 table space<br />

► Number of pages: 77601<br />

► Number of rows: 931,174<br />

► Number of indexes: 4 (1 partitioned index, 3 non-partitioned indexes)<br />

► Number of partitions of table space: 6<br />

► 2 columns are non-indexed columns (used <strong>for</strong> statistics)<br />

– Column1 cardinality=15104<br />

– Column2 cardinality=24<br />

To explain our test case more clearly, let us show you a part of our control statements <strong>for</strong><br />

testing. We have done equivalent RUNSTATS in V7 and V8, and we have taken equivalent<br />

statistics in V7 with the DSTATS tool, and in V8 with RUNSTATS. We are specifying 2 columns<br />

<strong>for</strong> statistics and both are non-indexed columns. The description of the statistics is:<br />

Chapter 6. Utilities 275

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

Saved successfully!

Ooh no, something went wrong!