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.

► Number of column groups: 1<br />

► Number of columns in column group: 2 (2 columns in one table)<br />

► Frequent values <strong>for</strong> distribution statistics: 10 most and 10 least frequent values<br />

Example 6-7 shows the sample statement of RUNSTATS in V7.<br />

Example 6-7 RUNSTATS statement in V7<br />

//SYSIN DD *<br />

RUNSTATS TABLESPACE INSQDB01.EVENTS TABLE(EVEN)<br />

REPORT(YES)<br />

Example 6-8 shows the sample statement of DSTATS tool used in V7.<br />

Example 6-8 DSTATS tool in V7<br />

//SYSIN DD *<br />

VALUES 10,10<br />

CARDINALITY MUST<br />

COLCARDF1 SCAN<br />

CARDF ALLOW 0<br />

USRT001.EVEN.CLID,TXCD<br />

Example 6-9 shows the RUNSTATS job used in V8 to collect distribution statistics.<br />

Example 6-9 RUNSTATS with distribution statistics in V8<br />

//SYSIN DD *<br />

RUNSTATS TABLESPACE INSQDB01.EVENTS TABLE(EVEN)<br />

COLGROUP(CLID,TXCD) FREQVAL COUNT 10 BOTH<br />

REPORT(YES)<br />

The result of this measurement is shown in Figure 6-5. If we compare the V7 RUNSTATS plus<br />

DSTATS tool, with the V8 RUNSTATS distribution statistics, we notice that both CPU and<br />

elapsed time are equivalent or better in V8.<br />

V8 RUNSTATS with distribution statistics shows a 15% improvement on elapsed time (51.5<br />

sec. vs. 44.5 sec.) and a 10% improvement on CPU time (43.8 sec. vs. 39.6 sec.).<br />

276 <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!