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.

time <strong>for</strong> an insert increases by 3.7% and the CPU time by 17% due to the architectural<br />

changes in <strong>DB2</strong> V8.<br />

If we change the requesting application to insert an array of 10, 100, 1000 or 10000 rows<br />

each with 20 columns we notice that the corresponding elapsed time at the DRDA application<br />

requestor and CPU time at the DRDA application server drop significantly compared to the 1<br />

row insert in <strong>DB2</strong> V7. The best result is obtained with a rowset size of 10000 where the DRDA<br />

application server CPU time is reduced by -72% and the DRDA application requestor elapsed<br />

time by 89%.<br />

(seconds)<br />

9<br />

6<br />

3<br />

0<br />

Multi-row Insert, Distributed - Host to Host<br />

(Total rows Inserted : 100,000 rows)<br />

Requester Class 1 Elapsed time Server Class 1 CPU time<br />

7.9<br />

8.2<br />

v7 v8 10k 1k 100 10 (n1)<br />

default 10 100 1K 10K (n2)<br />

V8 default = V8 without explicit multi-row Insert<br />

V8 n1 x n2 = V8 with explicit multi-row Insert,<br />

n1= # of Insert SQL calls<br />

n2= # of rows per MR Insert SQL call<br />

Figure 7-3 Multi-row INSERT - Distributed host to host<br />

1.8<br />

1.3<br />

1 0.9<br />

v7 v8 10k 1k 100 10 (n1)<br />

default 10 100 1K 10K (n2)<br />

Conclusion<br />

With implicit multi-row FETCH your applications will benefit immediately from the multi-row<br />

FETCH enhancement in a host to host DRDA environment without having to change the<br />

applications. Explicit multi-row support requires an application change. Host variable arrays<br />

are used to receive multi-fetch rowsets or serve as input <strong>for</strong> multi-row INSERT.<br />

Recommendation<br />

In host to host DRDA multi-row operations the best per<strong>for</strong>mance is obtained when the size of<br />

the host variable array matches the query block size which is 10 MB or 32767 rows whichever<br />

limit is first reached. Program virtual storage usage increases with the size of the arrays used.<br />

Explicit multi-row operations require <strong>DB2</strong> V8 in new-function mode (NFM).<br />

In general, 100 rows is just about the maximum needed to get the optimal per<strong>for</strong>mance.<br />

There is very little return beyond 100.<br />

(Sec)<br />

2<br />

1<br />

0<br />

1.6<br />

1.88<br />

0.73 0.68<br />

0.49 0.45<br />

Chapter 7. Networking and e-business 289

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

Saved successfully!

Ooh no, something went wrong!