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.

► Static SQL with table space scan<br />

► Fetch, insert, fetch/update and fetch/delete, each <strong>for</strong> a total of 100k rows<br />

– V7 and V8 single row<br />

– V8 multi-row (explicit)<br />

Multi-row fetch per<strong>for</strong>mance<br />

Figure 3-4 shows the CPU time (class 1) measurement <strong>for</strong> single-row fetch and multi-row<br />

fetch <strong>for</strong> all 100,000 rows from a non-partitioned table space. For the multi-row fetch cases we<br />

fetch the 100k rows varying the rowset from 2, 10, 100, 1k, and 10k rows.<br />

Class 1 CPU Time (Sec) 2-way 2084<br />

1.5<br />

1<br />

0.5<br />

0<br />

1.09<br />

Multi-row Fetch Per<strong>for</strong>mance<br />

(100,000 rows Fetched / test)<br />

Single-row V8 multi-row<br />

1.15<br />

Figure 3-4 CPU time (class 1) <strong>for</strong> single-row and multi-row fetch<br />

1.02<br />

V7 V8 50kx2 10kx10 1kx100 100x1k 10x10k<br />

V8 with explicit multi-row Fetch<br />

These measurements show:<br />

► For single-row fetch there is a 5% increase in CPU time when we compare the<br />

measurements in V7 to V8. This increase is primarily due to the overhead when operating<br />

in 64-bit addressing as compared to 31-bit addressing and normal release to release<br />

overhead.<br />

► 40% CPU time improvement with MR=10 rows<br />

► 50% CPU time improvement with MR=100+ rows<br />

The per<strong>for</strong>mance improvement using multi-row fetch in general depends on:<br />

► Number of rows fetched in one fetch<br />

► Number of columns fetched (more improvement with fewer columns), data type and size of<br />

the columns<br />

0.64<br />

50kx2 - 50,000 fetch loops, 2 rows per multi-row fetch<br />

10kx10 - 10,000 fetch loops, 10 rows per multi-row fetch<br />

1kx100 - 1,000 fetch loops, 100 rows per multi-row fetch<br />

100x1k - 100 fetch loops, 1,000 rows per multi-row fetch<br />

10x10k - 10 fetch loops, 10,000 rows per multi-row fetch<br />

0.55<br />

0.54<br />

0.54<br />

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

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

Saved successfully!

Ooh no, something went wrong!