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.

6.3.2 Conclusion<br />

We measured the CPU time <strong>for</strong> both LOAD and UNLOAD using three variations (internal<br />

<strong>for</strong>mat, external <strong>for</strong>mat, and delimited <strong>for</strong>mat) and our tested hardware was a z900 Turbo.<br />

There are 10 columns, including 4 CHAR, 1 VARCHAR, 3 DECIMAL, 1 SMALLINT and 1<br />

DATE and no index exists in our test table. Delimited requires using external <strong>for</strong>mat <strong>for</strong><br />

numeric. For example, INTEGER or SMALLINT is treated as if they were INTEGER<br />

EXTERNAL, and DECIMAL is treated as DECIMAL EXTERNAL. DATE is always treated as<br />

EXTERNAL, which causes the DATE fields to always have a large impact on UNLOAD<br />

per<strong>for</strong>mance, even though you might prefer internal <strong>for</strong>mat in several cases like migrating the<br />

DATE data to a different table.<br />

The results are shown in Table 6-1.<br />

Table 6-1 Delimited Load and Unload CPU comparisons<br />

External is more expensive than internal because DECIMAL and SMALLINT data in external<br />

<strong>for</strong>mat has to contain a character string that represents a number in specific <strong>for</strong>ms. However,<br />

it should be noted that external per<strong>for</strong>ms significantly worse than internal, especially with<br />

UNLOAD.<br />

When compared to LOAD and UNLOAD of external undelimited <strong>for</strong>mat, delimited <strong>for</strong>mat<br />

LOAD and UNLOAD have more impact on per<strong>for</strong>mance. It makes sense because in UNLOAD<br />

delimited <strong>for</strong>mat <strong>DB2</strong> has to build the output data to be either in character string or numeric<br />

external <strong>for</strong>mat, and also has to add column delimiters (default is comma) and a double<br />

quotation mark (") <strong>for</strong> the character string and a period (.) <strong>for</strong> the decimal point character.<br />

LOAD costs more because of the need to scan the VARCHAR data to define the length.<br />

In our test UNLOAD of external <strong>for</strong>mat significantly increased CPU time compared to internal<br />

<strong>for</strong>mat.<br />

6.4 RUNSTATS enhancements<br />

In this section we first show some per<strong>for</strong>mance improvements in executing RUNSTATS with<br />

different options, and then we discuss the new function which allows us to gather distribution<br />

statistics.<br />

6.4.1 General per<strong>for</strong>mance improvements<br />

Table 6-2 shows the measurements <strong>for</strong> RUNSTATS of a table with 10 million rows and 6<br />

indexes.<br />

The measurements were implemented on a <strong>IBM</strong> z900 Series 2064 processor.<br />

Table 6-2 Summary of RUNSTATS improvements<br />

RUNSTATS<br />

<strong>DB2</strong> V7 (sec.) <strong>DB2</strong> V8 (sec.) Delta CPU Delta ET<br />

option<br />

CPU Elapsed CPU Elapsed % %<br />

272 <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 />

internal external delimited delta (del/ext)<br />

LOAD (sec.) 11.41 16.3 26.5 +63%<br />

UNLOAD (sec.) 13.3 30.57 34.75 +14%<br />

TABLESPACE 15.7 39 8.6 40 -45.23 2.57

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

Saved successfully!

Ooh no, something went wrong!