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.

service <strong>for</strong> Unicode conversions, and prior to z/<strong>OS</strong> 1.4 the conversion service was very slow,<br />

especially on pre-z900 processors.<br />

<strong>DB2</strong> V8 brings many more enhancements in <strong>DB2</strong>’s support <strong>for</strong> Unicode as well as removing<br />

many of the limitations that were in V7. When you first start V8, you are running in CM in<br />

which the <strong>DB2</strong> catalog is still in EBCDIC and you are prevented from exploiting new function.<br />

However, all SQL parsing in V8 is done in Unicode, (that is, UTF-8), even in compatibility<br />

mode. SQL statements that are input in EBCDIC, ASCII or UTF-16 must be converted to<br />

UTF-8. In compatibility mode, all the <strong>DB2</strong> object names the SQL statements reference must<br />

again be converted to EBCDIC in order to compare them to <strong>DB2</strong> catalog data. In addition, all<br />

Utility control statements must be converted to Unicode be<strong>for</strong>e they are parsed.<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 subsystems always run in<br />

NFM. SQL statement conversion is unaffected by the switch to NFM, but all the <strong>DB2</strong> object<br />

names the SQL statements reference no longer need to be converted since the <strong>DB2</strong> object<br />

names are already in the CCSID of the <strong>DB2</strong> catalog. <strong>DB2</strong> V8 also introduces the capability to<br />

join two tables of different CCSIDs. Needless to say, Unicode conversion is necessary to do<br />

this and the extra CPU time is likely to be substantial.<br />

Now, let us turn to understanding how or when CCSID conversion impacts per<strong>for</strong>mance.<br />

Recall that ‘class 1 CPU time’ and ‘class 2 CPU time’ are CPU metrics reported in the <strong>DB2</strong><br />

accounting statistics. Class 1 CPU time represents the CPU time consumed between the<br />

creation of a <strong>DB2</strong> thread and the termination of the thread. Class 2 CPU time is a subset of<br />

the class 1 CPU time and it represents the CPU time from when the application passed the<br />

SQL statements to the local <strong>DB2</strong> system until return. Sometimes, class 2 time is referred to<br />

simply as ‘in <strong>DB2</strong> time’. In general, conversions per<strong>for</strong>med by remote clients affect neither<br />

class 1 nor class 2 CPU time, but conversions per<strong>for</strong>med by local Java clients only affect<br />

class 1 CPU time. The DBM1 address space handles all CCSID conversions on behalf of old<br />

mainframe legacy applications, including <strong>DB2</strong> utilities. The DIST address space handles all<br />

metadata conversions <strong>for</strong> remote applications, if any conversion is needed by <strong>DB2</strong>.<br />

Let us have a look in more detail. Figure 4-12 shows the flow of data <strong>for</strong> a typical legacy<br />

application accessing a Unicode table, where the application is bound using the default<br />

application encoding scheme, which is EBCDIC.<br />

Local Application <strong>DB2</strong> DBM1<br />

INSERT<br />

HV1 37<br />

HV2 37<br />

SELECT<br />

HV1 37<br />

HV2 37<br />

Figure 4-12 CCSID conversion - Local application<br />

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

Class 2 CPU Time<br />

1208 COLC<br />

1200 COLG<br />

1208 COLC<br />

1200 COLG

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

Saved successfully!

Ooh no, something went wrong!