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.

► CHAR(8) to VARCHAR(8)<br />

► CHAR(8) to CHAR(10)<br />

► INTEGER to DECIMAL(10,0)<br />

The CPU time (microsec.) <strong>for</strong> FETCH and INSERT be<strong>for</strong>e ALTER, after ALTER and after<br />

REORG are measured. Figure 5-8 shows the results <strong>for</strong> FETCH.<br />

CPU time (microseconds)<br />

30<br />

25<br />

20<br />

15<br />

10<br />

5<br />

0<br />

C8 =>VC8 C8 =>C10 Int =>Dec<br />

Figure 5-8 CPU time be<strong>for</strong>e ALTER, after ALTER and after REORG<br />

A per<strong>for</strong>mance degradation of 21% to 23% is measured after ALTER and be<strong>for</strong>e REORG.<br />

After reorganization the per<strong>for</strong>mance overhead remains below 5%.<br />

The per<strong>for</strong>mance fluctuation reflects the change of <strong>for</strong>mat and that “fast path <strong>for</strong> column<br />

processing” is disabled after ALTER and re-enabled again after reorganization of the table<br />

space. Even improved per<strong>for</strong>mance after reorganization is possible, depending on the new<br />

data type as some data types tend to be less CPU intensive, <strong>for</strong> example change from<br />

decimal to integer.<br />

Fast path <strong>for</strong> column processing was introduced in <strong>DB2</strong> V4. For SELECT, FETCH, UPDATE<br />

and INSERT, <strong>DB2</strong> will process each column definition <strong>for</strong> the first three rows. For the fourth<br />

and subsequent rows <strong>DB2</strong> generates and uses an optimized procedure to access further<br />

rows.<br />

Figure 5-9 shows the results <strong>for</strong> INSERT.<br />

234 <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><br />

Be<strong>for</strong>e Alter<br />

After Alter (AREO*)<br />

After Reorg (reset<br />

AREO*)

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

Saved successfully!

Ooh no, something went wrong!