N. America: (800)876-3101 | World: +44 (0) 1-344-386-367

Tutorial: 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.

Email Print Share

Designing Performance-Optimized Applications

Tutorial: Designing Performance-Optimized JDBC Applications Would you rather have the PDF version of this Tutorial? No Problem!

Click here to download the PDF version of Designing Performance-Optimized JDBC Applications.