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 Connctor/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%

Last update: 2007.

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

 MySQL Installation on Windows

 MySQL JDBC Driver (MySQL Connector/J)

 MySQL - PreparedStatement

 MySQL - Reference Implementation of JdbcRowSet

 MySQL - JBDC CallableStatement

 MySQL CLOB (Character Large Object) - TEXT

 MySQL BLOB (Binary Large Object) - BLOB

 Oracle Express Edition Installation on Windows

 Oracle JDBC Drivers

 Oracle - Reference Implementation of JdbcRowSet

 Oracle - PreparedStatement

 Oracle - JBDC CallableStatement

 Oracle CLOB (Character Large Object) - TEXT

 Oracle BLOB (Binary Large Object) - BLOB

 Microsoft SQL Server 2005 Express Edition

 Microsoft JDBC Driver for SQL Server - sqljdbc42.jar

 Microsoft JDBC Driver - Query Statements and Result Sets

 Microsoft JDBC Driver - DatabaseMetaData Object

 Microsoft JDBC Driver - DDL Statements

 Microsoft JDBC Driver - DML Statements

 SQL Server - PreparedStatement

 SQL Server CLOB (Character Large Object) - TEXT

 SQL Server BLOB (Binary Large Object) - BLOB

 JDBC-ODBC Bridge Driver - sun.jdbc.odbc.JdbcOdbcDriver

 JDBC-ODBC Bridge Driver - Flat Text Files

 JDBC-ODBC Bridge Driver - MS Access

 JDBC-ODBC Bridge Driver - MS SQL Server

Summary of JDBC Drivers and Database Servers

 JDBC Drivers Tested with Java SE 1.6

 Connection URL Formats and Examples

 Implementations of the DataSource Interface

Performances on Inserting Rows

 Additional Tutorial Notes to Be Added

 Outdated Tutorials

 References

 PDF Printing Version