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.

Recommendation<br />

If you currently do not use array fetch and insert in your CLI applications we recommend that<br />

you start using array operations. There is no default optimal rowset size. The improvement<br />

that can be realized will depend on the number of columns, the size of the row, the network<br />

bandwidth,... As you can conclude from this measurement the larger the rowset the less<br />

significant the improvement. As a rule of thumb we recommend that you experiment with a<br />

rowset size that fits in a 64 KB communication buffer. Note that column-wise binding of the<br />

application array variables is more efficiently supported by the CLI/ODBC Driver than<br />

row-wise binding.<br />

7.3 WebSphere and the <strong>DB2</strong> Universal Driver<br />

In this section we discuss the <strong>IBM</strong> <strong>DB2</strong> <strong>UDB</strong> Universal Driver <strong>for</strong> SQLJ and JDBC, also known<br />

as the Java Common Connectivity (JCC), from a per<strong>for</strong>mance perspective and the <strong>DB2</strong><br />

enhancements that will benefit Java in general.<br />

JDBC is a vendor-neutral SQL interface that provides data access to your application through<br />

standardized Java methods.<br />

These methods and interfaces are packaged as <strong>DB2</strong> JDBC Drivers and numbered from 1 to<br />

4:<br />

► Type 1<br />

This is the oldest type of driver. It was provided by Sun to promote JDBC when no<br />

database-specific drivers were available. With this driver, the JDBC API calls an ODBC<br />

Driver to access the database. This driver type is commonly referred to as a JDBC-ODBC<br />

bridge driver. Its shortcoming is that ODBC must be implemented and installed on all<br />

clients using this driver type. This restricts it to plat<strong>for</strong>ms that have ODBC support, and as<br />

such is mostly Windows centric. Since it also has to translate every JDBC call into an<br />

equivalent ODBC call, the per<strong>for</strong>mance of a Type 1 Driver is not great. <strong>IBM</strong> does not<br />

provide a Type 1 Driver.<br />

This type is no longer commonly used, because virtually every database vendor nowadays<br />

supports JDBC and provides their own (vendor-specific) driver.<br />

► Type 2<br />

A JDBC type 2 Driver relies on plat<strong>for</strong>m- and database-specific code to access the<br />

database. The application loads the JDBC Driver and the driver uses plat<strong>for</strong>m- and<br />

database-specific code to access <strong>DB2</strong>. This driver is also known as the “app” driver which<br />

refers to the implementation class name com.ibm.db2.jdbc.app.<strong>DB2</strong>Driver. This name and<br />

driver class name only applies to the old driver (not the universal) and applies only to <strong>DB2</strong><br />

<strong>for</strong> Multiplat<strong>for</strong>ms. This is the most common driver type used, and offers the best<br />

per<strong>for</strong>mance. However, as the driver code is plat<strong>for</strong>m-specific, a different version has to be<br />

coded (by the database vendor) <strong>for</strong> each plat<strong>for</strong>m.<br />

The new Universal Driver has a Type 2 implementation available.<br />

► Type 3<br />

With this driver type, also referred to as the “net” driver (implementation class<br />

com.ibm.db2.jdbc.net.<strong>DB2</strong>Driver), the JDBC API calls are routed through a middleware<br />

product using standard network protocols such as TCP/IP. The driver itself is written in<br />

Java. The middleware translates these calls into database-specific calls to access the<br />

target database and returns data to the calling application. In the case of <strong>DB2</strong>, this task is<br />

per<strong>for</strong>med by a program called the JDBC applet server. <strong>DB2</strong> <strong>for</strong> z/<strong>OS</strong> and <strong>OS</strong>/390 does<br />

not supply a Type 3 Driver. <strong>DB2</strong> <strong>for</strong> Linux, Unix and Windows still has a so-called network<br />

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