Performance Tuning of a Daffodil DB / One$DB -JDBC Application

By: Parveen Aggarwal

This article illustrates the best practices to improve the performance of Daffodil DB / One$DB JDBC Driver. This article focuses on how to improve the performance of a Daffodil DB / One$DB JDBC application using Statement, PreparedStatemnt, CallableStatement and ResultSet interfaces. Choosing the right statement interfaces and right methods according to your SQL query plays a vital role in improving the performance of a JDBC Driver.  

JDBC Overview

JDBC API provides standard set of interfaces to work with databases like Daffodil DB / One$DB, Oracle, Derby etc.

 

Connection interface encapsulates database connection functionality, Statement interface encapsulates SQL statement representation and execution functionality whereas ResultSet interface encapsulates retrieving data which comes from the execution of a SQL query using Statement.

Following are the basic steps to write a JDBC program.

  1. Import "java.sql" and "javax.sql" packages. (Import "javax.sql", if advanced JDBC feature like XA is to be used)
  2. Load Daffodil DB JDBC driver (embedded or network JDBC Driver)
  3. Establish connection to database using Connection interface
  4. Create a Statement
  5. Execute the Statement
  6. Retrieve results by using ResultSet interface
  7. Close Statement and Connection

, CallableStatement gives better performance as compared to PreparedStatement and Statement.

To read the full article please visit

Top Searches on
Computers
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 

» More on Computers