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 4-16 shows the Universal Java Type 4 Driver remotely connecting to <strong>DB2</strong> V8 from AIX.<br />

It also assumes that Deferred Prepare is used. By default, the Type 4 Driver defers the<br />

Prepare in order to minimize network overhead.<br />

Java<br />

Application<br />

1st INSERT<br />

HV1 1200<br />

HV2 1200<br />

AIX z/<strong>OS</strong><br />

JVM<br />

Subsequent INSERT<br />

HV1 1200<br />

HV2 1200<br />

SELECT<br />

HV1 1200<br />

HV2 1200<br />

Java<br />

Application<br />

1st INSERT<br />

HV1 1200<br />

HV2 1200<br />

JVM<br />

Subsequent INSERT<br />

HV1 1200<br />

HV2 1200<br />

SELECT<br />

HV1 1200<br />

HV2 1200<br />

1208 COLC<br />

1208 COLG<br />

1390 COLC<br />

16684 COLG<br />

1208<br />

1208<br />

<strong>DB2</strong> <strong>for</strong> z/<strong>OS</strong><br />

DDF DBM1<br />

<strong>DB2</strong> <strong>for</strong> z/<strong>OS</strong><br />

DDF DBM1<br />

1390 COLC<br />

16684 COLG<br />

1390 COLC<br />

16684 COLG<br />

1390 COLC<br />

16684 COLG<br />

1208 COLC<br />

1200 COLG<br />

1208 COLC<br />

1200 COLG<br />

1208 COLC<br />

1200 COLG<br />

Figure 4-16 CCSID conversion - Remote Prepare using Java Universal Type 4 Driver<br />

The Type 4 Driver offers a new interface called ParameterMetaData to retrieve the table<br />

characteristics, but of course it requires network communication. After ParameterMetaData is<br />

invoked, the Universal Driver uses CCSIDs in the same way the Type 2 Driver does. If<br />

ParameterMetaData is not used, and Deferred Prepare is used, the first Insert sends the data<br />

in UTF-8; if the table is stored in EBCDIC, <strong>DB2</strong> <strong>for</strong> z/<strong>OS</strong> needs to convert the data to<br />

EBCDIC. Subsequent inserts do not require any conversions by <strong>DB2</strong> <strong>for</strong> z/<strong>OS</strong>. Again, as with<br />

the Type 2 Driver, subsequent INSERTs and SELECTs do not require any conversions <strong>for</strong><br />

Graphic columns.<br />

Note that <strong>for</strong> static SQL processing where the SQL statements are prebound by SQLJ,<br />

Deferred Prepares are not applicable because the CCSIDs are already known by SQLJ at<br />

execution time.<br />

SQL statements and <strong>DB2</strong> object names such as Authorization Ids and package names may<br />

also require CCSID conversion. Figure 4-17 shows an AIX application using <strong>DB2</strong> Connect<br />

and DRDA to remotely prepare an SQL statement remotely, connecting to <strong>DB2</strong> V7 and <strong>DB2</strong><br />

V8.<br />

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

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

Saved successfully!

Ooh no, something went wrong!