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.

4.7.2 Conclusion<br />

The enhancements we have seen in <strong>DB2</strong> V8, z/<strong>OS</strong> Conversion Services and the z990<br />

hardware dramatically improve Unicode conversion per<strong>for</strong>mance.<br />

Prior to the z/<strong>OS</strong> Conversion Services improvement (HC3), Unicode conversion to EBCDIC<br />

was always slower than ASCII conversion to EBCDIC, but this is not true with HC3. In V7<br />

Unicode conversion is about 20% faster than ASCII conversion. In addition, V8 major Unicode<br />

conversion is about 12% faster than ASCII conversion, but minor conversion is much faster<br />

still.<br />

The cost of conversion can affect the total CPU time of your application. As an example,<br />

consider a table space scan of 1 million rows with no predicates or indexes. On the z900 with<br />

V8, the table space scan used 18.6 CPU seconds when there was no conversion, and 63.3<br />

CPU seconds <strong>for</strong> major conversion. In other words, 67% of the time was spent doing<br />

conversion. For this study, each major conversion used 2.3 microseconds and was 25 times<br />

faster.<br />

4.7.3 Recommendations<br />

Although <strong>DB2</strong> V8 can run on z/<strong>OS</strong> 1.3, we recommend you migrate to at least z/<strong>OS</strong> 1.4, to<br />

take advantage of the enhancements that have been made to the z/<strong>OS</strong> Conversion Services.<br />

Notice that z/<strong>OS</strong> 1.3 was out of service as of March 31, 2005. In addition, migrating to current<br />

hardware brings per<strong>for</strong>mance improvements to the z/<strong>OS</strong> Conversion Services.<br />

When choosing to store data in a Unicode database, you have a choice of using either UTF-8<br />

(CHAR) or UTF-16 (GRAPHIC). This choice includes both per<strong>for</strong>mance and nonper<strong>for</strong>mance<br />

considerations. However, the major per<strong>for</strong>mance consideration when comparing UTF-8 to<br />

UTF-16 is the amount of space used. CPU time can also be another consideration. Obviously<br />

compression itself costs a lot of CPU time, although its I/O benefits may outweigh the CPU<br />

costs. Choosing between fixed and variable length strings can also be a consideration. The<br />

decision between UTF-8 and UTF-16 there<strong>for</strong>e has the potential to have a real impact on<br />

application per<strong>for</strong>mance.<br />

We recommend you closely consider the type of data you will be storing in <strong>DB2</strong> and choose<br />

UTF-8 (CHAR) or UTF-16 (GRAPHIC) depending on the characteristics of the data. UTF-8 is<br />

efficient <strong>for</strong> text that is predominantly English alphanumeric while UTF-16 is more efficient <strong>for</strong><br />

Asian characters.<br />

In addition, there are big advantages to limiting the data to single byte characters, so that<br />

minor conversion can succeed. However, we do not think you run the risk of compromising<br />

your application design in order to take advantage of <strong>DB2</strong> minor conversion techniques. In<br />

any event, using multi-byte characters does not impact per<strong>for</strong>mance if Unicode conversion is<br />

unnecessary.<br />

Some customers who use <strong>DB2</strong> Connect to connect to <strong>DB2</strong> <strong>for</strong> z/<strong>OS</strong> have been using<br />

DISABLEUNICODE=1 to tell <strong>DB2</strong> Connect to send the data to <strong>DB2</strong> <strong>for</strong> z/<strong>OS</strong> in ASCII rather<br />

than Unicode. In the past, converting from ASCII to EBCDIC was much less expensive than<br />

converting from Unicode to EBCDIC. However now in z/<strong>OS</strong> 1.4, Unicode conversion is faster<br />

than ASCII conversion. Furthermore if the database is stored in Unicode, setting<br />

DISABLEUNICODE adds Unicode conversion times to the class 2 CPU times. We there<strong>for</strong>e<br />

recommend you not to set the DISABLEUNICODE parameter when you are using <strong>DB2</strong><br />

Connect to connect to <strong>DB2</strong> V8.<br />

Since the Universal Driver does not need <strong>DB2</strong> Connect, the DISABLEUNICODE parameter is<br />

not generally applicable. Instead, the Universal Type 4 Driver supports a new<br />

Chapter 4. <strong>DB2</strong> subsystem per<strong>for</strong>mance 187

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

Saved successfully!

Ooh no, something went wrong!