Software Information

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


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

Choosing right Statement interface:

There are three types of Statement interfaces in JDBC to represent/execute a SQL query-Statement, PreparedStatement and CallableStatement. Statement is used for executing static SQL statement with no input and output parameters; PreparedStatement is used to execute dynamic SQL statement with input parameters whereas CallableStatement is used to execute dynamic SQL with both input and output parameters. One important thing to note about PreparedStatement and CallableStatement is that they can also be used for static SQL statements. However, CallableStatement is mainly meant for stored procedures.

PreparedStatement gives better performance when compared to Statement because it is pre-parsed and pre-compiled. This means that compilation and parsing of such statement is done only once by the database. Afterwards the database reuses the already parsed and compiled statement. This significantly improves the performance because whenever a statement has to be executed repeatedly, it doesn't need to be parsed and compiled time and again. So the overload incurred by parsing and compiling the same statement can be reduced.

When there is a requirement for single request to process multiple complex statements, CallableStatement gives better performance as compared to PreparedStatement and Statement.

To read the full article please visit http://www.daffodildb.com/daffodildb-performance-tuning.html

This article has been contributed by (Mr.) Parveen Aggarwal, Technical Consultant to DSL India (http://www.daffodildb.com). With more than 6 years of industry experience in Java and allied technologies, he has an in-depth understanding of J2EE, J2ME and database management systems. Parveen is currently working on the concept of data-archiving in embedded databases. He can be contacted at parveenaggarwal@hotmail.com


MORE RESOURCES:

Software allows social sites to share info
Bizjournals.com, NC - 14 hours ago
JACKSONVILLE — A Jacksonville software company is knocking down walls between social networks, such as MySpace and LinkedIn, by giving users more control ...


SYS-CON Media

Composite Software to Exhibit at SYS-CON's Virtualization and ...
SYS-CON Media, NJ - 5 hours ago
SYS-CON Events announced today that the eading global virtualization technology provider Composite Software to exhibit at SYS-CON's 4th International ...
Active Endpoints Named "Gold Sponsor" of SYS-CON's SOA World ... SYS-CON Brasil (Assinatura)
EMC Named "Gold Sponsor" of SYS-CON's SOA World and Virtualization ... SYS-CON Media
Intel Named "Gold Sponsor" of SYS-CON's SOA World and ... SYS-CON Media
all 35 news articles


Software firms defy the gloom
Times Online, UK - 7 hours ago
SCOTLAND’S software sector is defying economic gloom to attract millions of pounds in new business, according to a new survey. ...


Review: Tiny flash drives improve their security
San Jose Mercury News,  USA - 22 hours ago
I put a few secure flash drive solutions to the test: Take Anywhere's Pocket Safe ($59.95), the IronKey ($149) and TrueCrypt, a free software program that ...


Orange suspends Blackberry Bold handsets over software glitches
Telegraph.co.uk, United Kingdom - Oct 10, 2008
By Matthew Moore Phone provider Orange has stopped dispatching Blackberry Bold handsets due to software problems with the devices, in a move that threatens ...
Software problems hit BlackBerry Bold IT PRO
Third-party BlackBerry Software Development a Learning Process for RIM Brighthand
Orange UK Suspends Sales of BlackBerry Bold Due to Software Bugs Cellular-News
CRN - U.S. News & World Report
all 1,068 news articles


Sys-Con Italia (Comunicati Stampa)

AppSense Named "Gold Sponsor" of SYS-CON's Virtualization & Cloud ...
Sys-Con Italia (Comunicati Stampa) - 8 hours ago
... Black Duck Software, Blackbaud, Blade Network Technologies, Blue Coat, Blue Lane, BlueArc, BlueNote Networks, BluePheonix Solutions, BMC Software, ...


BBC News

US judge halts sales of RealNetworks DVD software
Reuters - Oct 9, 2008
RealDVD, a software product from RealNetworks subsidiary RealNetworks Home Entertainment Inc, allows users to create a copy of a DVD for their computer's ...
For PC: RealDVD works so well that it's on legal hold Dallas Morning News
Drop that DVD copying software and put your hands in the air InfoWorld
RealDVD Sales Halted On Judge's Order, Copyright Suit Pending InformationWeek
International Herald Tribune - BBC News
all 335 news articles


40 laid off at software company as execs arrested
nwitimes.com, IN - 15 hours ago
SEATTLE - Two former software executives grossly overstated their company's revenue to attract more than $50 million in private investment, prosecutors said ...
Prosecutor: Exec used company as 'piggy bank' Seattle Times
Judge orders Entellium CEO kept in custody Seattle Post Intelligencer
Feds can’t find $9.6M from Entellium Bizjournals.com
all 20 news articles


Dorado Software Announces Redcell Storage Commander for Automated ...
MarketWatch - Oct 10, 2008
Redcell Storage Commander, Redcell OpsCenter, and Redcell Network Commander are generally available and trial software is available on the Dorado Software's ...


The ONLY Property and Facilities Management Software Exhibition in ...
1888 Press Release (press release), TX - 2 hours ago
The three leading software solutions who are at the forefront of technology exhibiting under one roof at the only property and facilities management ...

Software - Google News

home | site map
© 2006