Performances on Inserting Rows

This section provides a simple comparison of performances on inserting rows with different JDBC drivers and their database servers.

While testing different ways of inserting rows into database tables, I have also collected their performances of inserting 10000 rows on my Windows XP system with a 997MHz processor. A summary of various performance results using different inserting statements with different JDBC drivers is provided here as a comparison and a reference:

Driver Name: Apache Derby Network Client JDBC Driver
------------
Driver JAR File: derbyclient.jar
Statement           # of inserts   Time in ms.   Comparison
Regular Statement   10000          47531         598%
PreparedStatement   10000           7953         100%
ResultSet           10000           5906          74%

Driver Name: MySQL Connector/J
------------
Driver JAR File: mysql-connector-java-5.0.7-bin.jar
Statement           # of inserts   Time in ms.   Comparison
Regular Statement   10000           1297         101%
PreparedStatement   10000           1281         100%
ResultSet           10000           3062         239%

Driver Name: Oracle JDBC Thin client-side driver
------------
Driver JAR File: ojdbc14.jar
Statement           # of inserts   Time in ms.   Comparison
Regular Statement   10000          13609         174%
PreparedStatement   10000           7843         100%
ResultSet  ?

Driver Name: Miscrosoft JDBC Driver
------------
Driver JAR File: sqljdbc.jar
Statement           # of inserts   Time in ms.   Comparison
PreparedStatement   10000           5625         100%
Regular Statement   10000           6750         120%
ResultSet           10000           6203         110%

Table of Contents

 About This Book

 JDBC (Java Database Connectivity) Introduction

 JDK (Java SE) Installation

 Installing and Running Java DB - Derby

 Derby (Java DB) JDBC Driver

 Derby (Java DB) JDBC DataSource Objects

 Java DB (Derby) - DML Statements

 Java DB (Derby) - ResultSet Objects of Queries

 Java DB (Derby) - PreparedStatement

Summary of JDBC Drivers and Database Servers

 List of Tested JDBC Drivers

 Connection URL Formats and Examples

 Implementations of the DataSource Interface

Performances on Inserting Rows

 Using Connection Pool with JDBC

 Archived Tutorials

 References

 Full Version in PDF/EPUB