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.

that all applications are converted to Unicode, Unicode conversion is supported <strong>for</strong> every<br />

language that is used to access the common database. However, only one nation (code<br />

character set) is specified during <strong>DB2</strong> installation. This nation's character set is used as the<br />

default character set when a database is stored as EBCDIC or ASCII, and is also the default<br />

EBCDIC application encoding scheme. This nation will be referred to as the host nation.<br />

Minor conversion is only supported <strong>for</strong> the host nation's EBCDIC encoding scheme. All other<br />

nations will use major conversion.<br />

How does minor conversion work? The zSeries instruction set has always included a TR<br />

instruction that translates one byte <strong>for</strong> one byte, based on a 256-byte conversion table. A TRT<br />

instruction has also existed which could be used to test a string <strong>for</strong> certain one-byte<br />

characters. As long as a single byte Latin alphanumeric character can be represented in<br />

UTF-8 by a single byte, a TR instruction will suffice. <strong>DB2</strong> V8 has built-in translate tables <strong>for</strong><br />

most common single byte CCSIDs and if the TRT instruction is “successful”, <strong>DB2</strong> V8 can<br />

translate the string using a TR instruction. Such translations are called “minor conversions”.<br />

The presence of shift-in/shift-out characters in a mixed string will always cause the TRT<br />

instruction to fail. If the TRT fails, then <strong>DB2</strong> must invoke the z/<strong>OS</strong> Unicode conversion service.<br />

Such conversions in <strong>DB2</strong> are called “major conversions”. Whereas minor conversions cannot<br />

change the length of the string (in terms of bytes), major conversions may change the length,<br />

running the risk of possible truncation or padding when using fixed length columns or host<br />

variables.<br />

The per<strong>for</strong>mance of minor conversion is much better than the per<strong>for</strong>mance of major<br />

conversion, hence, minor conversion is one of the significant advantages of <strong>DB2</strong> V8<br />

compared to V7, and represents an advantage of UTF-8 over UTF-16. Even when <strong>DB2</strong> V8<br />

must resort to major conversion, V8 is still much faster than V7.<br />

9.1.3 <strong>DB2</strong> catalog changes<br />

The <strong>DB2</strong> catalog continues to grow with every release of <strong>DB2</strong>. In addition to the new catalog<br />

objects required to support the new functions in <strong>DB2</strong> (tables, columns, and so <strong>for</strong>th), V8<br />

introduces a number of other significant changes to the catalog:<br />

► Changing the definition of many existing columns to support long names<br />

► Converting the character columns in the catalog from EBCDIC to Unicode<br />

Refer to the <strong>DB2</strong> Release Planning Guide, SC18-7425, and Appendix A of the <strong>DB2</strong> SQL<br />

Reference, SC18-7426, <strong>for</strong> a complete list of changes to the <strong>DB2</strong> catalog.<br />

Table 9-1 shows how the <strong>DB2</strong> catalog has grown across its <strong>Version</strong>s.<br />

Table 9-1 <strong>DB2</strong> catalog growth<br />

<strong>DB2</strong> <strong>Version</strong> Table spaces Tables Indexes Columns Table check<br />

constraints<br />

V1 11 25 27 269 N/A<br />

V3 11 43 44 584 N/A<br />

V4 11 46 54 628 0<br />

V5 12 54 62 731 46<br />

V6 15 65 93 987 59<br />

V7 20 82 119 1206 105<br />

V8 22 84 132 1265 105<br />

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