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.

Figure 9-1 Unicode conversion example<br />

<strong>DB2</strong> V8 brings significant enhancements in the Unicode area lifting restrictions that were in<br />

<strong>DB2</strong> V7. These enhancements include Unicode parsing and the conversion of the <strong>DB2</strong><br />

Catalog to Unicode. <strong>DB2</strong> V8 <strong>for</strong>malizes a two stage migration process that used to be<br />

followed by customers implicitly, but which is now en<strong>for</strong>ced by <strong>DB2</strong>.<br />

When you first start <strong>DB2</strong> V8, you are running in CM where the <strong>DB2</strong> catalog is still in EBCDIC<br />

and you are prevented from exploiting new function. However, all SQL parsing in <strong>DB2</strong> V8 is<br />

done in Unicode, that is, UTF-8, even in compatibility mode. SQL statements that are input in<br />

EBCDIC, ASCII or UTF-16 must be converted to UTF-8. In compatibility mode, metadata that<br />

is derived (in other words, parsed) from the SQL statement must be converted to EBCDIC in<br />

order to compare them to <strong>DB2</strong> catalog data.<br />

When you migrate the catalog to new-function mode (NFM), the <strong>DB2</strong> catalog is converted to<br />

Unicode, and fallback to V7 is no longer possible. New <strong>DB2</strong> V8 installations always run in<br />

NFM.<br />

SQL statement conversion is unaffected by the switch to NFM, but metadata derived from<br />

SQL is no longer converted since the metadata is already in the CCSID of the <strong>DB2</strong> catalog.<br />

On the other hand, Unicode conversion is introduced <strong>for</strong> column names specified within an<br />

SQLDA in EBCDIC or ASCII. <strong>DB2</strong> V8 also introduces the capability to join two tables of<br />

different CCSIDs. Needless to say, Unicode conversion is necessary to do this and the extra<br />

CPU time is likely to be substantial.<br />

<strong>DB2</strong> V8 major and minor conversion<br />

Conversion of SQL statements and metadata generally involves English alphanumeric<br />

characters. To improve per<strong>for</strong>mance, <strong>DB2</strong> V8 developed a faster way to convert such<br />

characters without calling the z/<strong>OS</strong> Conversion Services. This fast method is called minor<br />

conversion, while major conversion refers to those conversions per<strong>for</strong>med by the z/<strong>OS</strong><br />

Conversion Services. <strong>DB2</strong> does this by maintaining a translate table associated with the<br />

EBCDIC SBCS/single bytes of the mixed CCSIDs that are specified during <strong>DB2</strong> installation.<br />

The same translate table is used <strong>for</strong> accesses to the <strong>DB2</strong> catalog and user data. Minor<br />

conversion is supported <strong>for</strong> all European EBCDIC character sets, and some Asian EBCDIC<br />

character sets. Minor conversion does not apply to UTF-16 (GRAPHIC) or ASCII; it may only<br />

apply to conversions between EBCDIC and UTF-8.<br />

In a multinational corporate environment, we may see applications originating from different<br />

national languages accessing a common database. A Unicode database allows such a<br />

multinational corporation to store all of its data in a single database. Since we cannot assume<br />

Chapter 9. Installation and migration 343

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

Saved successfully!

Ooh no, something went wrong!