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.

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

3.11.2 Conclusion<br />

can provide a large elapsed time improvement in all cases where the DSNREXX module<br />

is not already loaded in LLA/VLF to reduce the module fetch time.<br />

Figure 3-43 shows the measurements of a REXX application fetching 100k rows from a table<br />

in V7 and V8. There are very significant reductions in elapsed time and some reduction in<br />

CPU time.<br />

Figure 3-43 REXX support improvement<br />

The measurements show that the elapsed time of programs in REXX language can be<br />

significantly reduced (if the DSNREXX module was not already preloaded by other means.)<br />

The improvement is larger with larger number of SQL statements.<br />

CPU time is also reduced.<br />

3.11.3 Recommendations<br />

REXX support improvement<br />

REXX application which issues 100k<br />

fetches against a TPCD table.<br />

Class 1 elapsed time 29X better than V7<br />

Class 1 CPU time 30% better<br />

You do not need to do anything to have the per<strong>for</strong>mance benefits if you are using REXX<br />

programs that issue a large number of calls.<br />

3.12 Dynamic scrollable cursors<br />

V7CL1 V8 CL1<br />

Be<strong>for</strong>e <strong>DB2</strong> V7, you could only scroll cursors in a <strong>for</strong>ward position. So when a cursor was<br />

opened, the cursor would be positioned be<strong>for</strong>e the first row of the result set. When a fetch was<br />

executed, the cursor would move <strong>for</strong>ward one row.<br />

<strong>DB2</strong> V7 introduced static scrollable cursors as cursors which can be scrolled backwards or<br />

<strong>for</strong>wards, and to an absolute position or to a relative position. They use a DECLARED<br />

TEMPORARY TABLE (DTT) introduced first in <strong>DB2</strong> V6. When the cursor is opened, <strong>DB2</strong><br />

3500<br />

3000<br />

2500<br />

2000<br />

1500<br />

1000<br />

500<br />

0<br />

Elapsed sec<br />

CPU sec<br />

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

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

Saved successfully!

Ooh no, something went wrong!