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 performance tips 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 includes:

  • Using Database MetaData methods appropriately
  • Retrieve only required data
  • Select functions that optimize performance
  • Manage connections and updates

Also design Your Application for Best Performance:

  • Connection Pools
  • Caching Data
  • Process as Much Data as Possible Inside the Database
  • Use Built-in DBMS Set-based Processing
  • Make Your Queries Smart
  • Make Transactions Single-batch
  • Never Have a DBMS Transaction Span User Input
  • Use In-place Updates
  • Keep Operational Data Sets Small
  • Use Pipelining and Parallelism

Ref:
JDBC performance tips
Performance Tuning Your JDBC Application

Advertisements