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.

► Measurement data collected with <strong>DB2</strong> Per<strong>for</strong>mance Expert V2<br />

– Accounting trace class 1,2,3<br />

– Statistics trace class 1,3,4,5,6,8<br />

Measurement methodology<br />

► One table defined in one segmented table space is used <strong>for</strong> all measurements.<br />

► All the measurements involved only table space scans (1 index is defined).<br />

► First time effect<br />

Bring up the <strong>DB2</strong> subsystem be<strong>for</strong>e each measurement to clear the data in the buffer pool,<br />

eliminating the inconsistency of different buffer hit ratios from run to run.<br />

► No concurrency issues<br />

There is no other program accessing the table space during the measurements.<br />

► Read programs are bound with ISOLATION(CS) and CURRENT DATA(NO)<br />

► Update programs are bound with ISOLATION(RS)<br />

► Each program issues one commit after closing the cursor<br />

Measurement cases<br />

► Read cursor (single row fetch) - Static vs. dynamic<br />

► Update cursor (single row fetch and update) - Static vs. dynamic<br />

► Multi-row FETCH using static or dynamic cursors - Single row vs. multi-row<br />

► Multi-row FETCH and UPDATE or DELETE using static or dynamic cursors - Single row<br />

vs. multi-row<br />

3.12.4 Test description and study<br />

The following is the description of our four test cases and study from our measurement data.<br />

The programs are all written in PL/I.<br />

Test scenario 1: Read cursor - Static vs. dynamic<br />

This test uses two types of FETCH programs. The intent is to compare insensitive with<br />

asensitive cursors <strong>for</strong> static and dynamic.<br />

The first program, shown in Example 3-14, declares an insensitive scrollable cursor to retrieve<br />

data from the table. It means this program is strictly read-only (does not allow positioned<br />

update and delete).<br />

Example 3-14 Read program of static cursor<br />

DECLARE C1 INSENSITIVE SCROLL CURSOR WITH HOLD FOR SELECT<br />

COL1, COL2, COL3, COL4, COL5,<br />

COL6, COL7, COL8, COL9, COL10<br />

FROM TABLE<br />

WHERE COL2 < ‘ROWNNNNNNNNN’;<br />

DO I = 1 TO 50000;<br />

FETCH INSENSITIVE NEXT C1 INTO<br />

:COL1,:COL2,:COL3,:COL4,:COL5,<br />

:COL6,:COL7,:COL8,:COL9,:COL10;<br />

END;<br />

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