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.

Table 6-4 RUNSTATS with DSTATS measurement data in V8<br />

Class 1<br />

elapsed<br />

(sec.)<br />

Class 1<br />

CPU time<br />

(sec.)<br />

DSTATS<br />

CL1 ELT<br />

(sec.)<br />

DSTATS<br />

CL1 CPU<br />

(sec.)<br />

DSTATS<br />

Overhead<br />

ELT (%)<br />

DSTATS<br />

Overhead<br />

CPU (%)<br />

Case 1<br />

RUNSTAT<br />

S<br />

table<br />

Case 2<br />

RUNSTAT<br />

S<br />

table idx<br />

Case 3<br />

RUNSTAT<br />

S<br />

table<br />

1 column<br />

Case 4<br />

RUNSTAT<br />

S<br />

table<br />

1 colgrp<br />

w/ 2 cols<br />

Case 5<br />

RUNSTAT<br />

S<br />

table idx<br />

1 colgrp<br />

w/ 2 cols<br />

26.04 29.26 28.00 27.99 30.59 39.67<br />

19.10 21.62 24.50 24.32 26.62 32.22<br />

N/A N/A 1.96 1.94 1.32 13.63<br />

N/A N/A 5.39 5.22 5.00 13.12<br />

N/A N/A 7.5 7.5 4.5 52.3<br />

N/A N/A 28.3 27.3 23.1 68.7<br />

In V8 we can observe the CPU overhead when running RUNSTATS specifying distribution<br />

statistics. In case 3, which is the base scenario of DSTATS, we see a 28.3% overhead in CPU<br />

time, and in case 4 (adding 1 column to the COLGROUP) we see 27.3%.<br />

However, in Case 6 (2 column groups) it is 68.7%. We can conclude that, in V8, increasing<br />

the number of column groups drives the CPU cost higher than increasing the number of<br />

columns.<br />

There is almost no difference when 1 column is added in 1 column group (Case 3 to 4). On<br />

the other hand, there is 29.7% degradation in elapsed time and 21% degradation in CPU time<br />

of the total RUNSTATS time, when the column group of statistics goes to 2 (Case 4 to 6).<br />

In general, V8 RUNSTATS cuts down the elapsed time well compared to V7.<br />

Case 6<br />

Runstats<br />

table<br />

2 colgrp<br />

w/ 2 ,1 cols<br />

Access path improvement<br />

To verify the usefulness of DSTATS we have tested the access path improvement of 6 queries<br />

out of 25 queries of the query workload after running distribution statistics. We have gathered<br />

distribution statistics on 10 columns manually picked. After that, most of the queries have<br />

shown positive access path changes.<br />

Bind cost<br />

You need to consider that RUNSTATS executions, by adding the frequency values in the<br />

SYS<strong>IBM</strong>.SYSCOLDIST catalog table, cause high bind cost. Especially high CPU<br />

consumption occurs <strong>for</strong> dynamic prepare when FREQVAL COUNT in SYSCOLDIST is<br />

greater than 100. In this case a large portion of CPU time is used to remove duplicate<br />

frequency values. PTF UK00296 <strong>for</strong> APAR PQ94147 is meant to reduce such large bind cost.<br />

Chapter 6. Utilities 279

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

Saved successfully!

Ooh no, something went wrong!