Designing Performance–Optimized JDBC™ Applications

View PDF

Introduction

Recognized as experts in database access standards such as ODBC, Java™ JDBC™, and ADO/OLE DB, DataDirect Technologies has consistently been instrumental in the development of new database access standards specifications. DataDirect Technologies was the first vendor to ship commercial JDBC drivers and the first vendor to be J2EE 1.3 and 1.4 JDBC certified across all major databases. Our role in helping Sun Microsystems, Inc write the original JDBC standard and subsequent modifications gives us unique technical insight into JDBC application performance.

Developing performance-oriented JDBC applications is not easy. JDBC drivers do not throw exceptions to tell you when your code is running too slow.

This document presents some general guidelines for improving JDBC application performance that have been compiled by examining the JDBC implementations of numerous shipping JDBC applications. These guidelines include:

Following these guidelines can help you solve some common JDBC system performance problems, such as those listed in the following table.

Problem

Solution

See guidelines in…

Network communication is slow.

Reduce network traffic.

Using Database Metadata Methods

Evaluation of complex SQL queries on the database server is slow and can reduce concurrency.

Simplify queries.

Using Database Metadata Methods

Selecting JDBC Objects and Methods

Excessive calls from the application to the driver slow performance.

Optimize application-to-driver interaction.

Retrieving Data

Selecting JDBC Objects and Methods

Disk input/output is slow.

Limit disk input/output.

Managing Connections and Updates

In addition, most JDBC drivers provide options that improve performance, often with a tradeoff in functionality. If your application is not affected by functionality that is modified by setting a particular option, significant performance improvements can be realized. For details about performance-related options, refer to your JDBC driver documentation.

Ready to try DataDirect Connect for JDBC?
Download Now | Learn More
Ready to try DataDirect Connect for JDBC?