Hi friends, I have a que , that que is gettting the data(records) very fastly (updates very fastly).Those records have to be inserted in data base very fastly. prasently it is taking so much time , say for example 3 min per 1000 records. I want with in 20 sec(max). Can we have insert into DB using java that much fastly ? Is there is any technic to improve the performence in jdbc. Pl suggest me the some way to get this. Thanking u Suresh
what database/jdbc driver combination are you using? some huge performance gains can be made using PreparedStatements instead of Statements and Batch updating can also vastly improve performance if utilized correctly. Jamie
"siri_suresh", The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in again with a new name which meets the requirements. Thanks. Dave.
Joined: Dec 03, 2001
Hi Jamie , thanks for ur suggision. I am using Oracle,OCI8 Driver and my table have 60 colomns(max fields are varchar type). Can u suggist how we can do batch updation. Thanking u Suresh Kumar
Originally posted by Jamie Robertson: what database/jdbc driver combination are you using? some huge performance gains can be made using PreparedStatements instead of Statements and Batch updating can also vastly improve performance if utilized correctly. Jamie
Hi Suresh! As u told u are using oci8 driver so driver is not the problem with u.Using prepared or callable statemets can improve performance but it will not be of much help .You can use Batch Updates as per JDBC2.1. Batching large no. of statements can help in significant performance gain.Then one more thing which can help ya is to have a connection pool which will increase the performance considerably .Then if you can use JDBC2.0 u will have the option of using Cashed RowSet which will significantly improve the performance as it caches the rowset on client end till that ResultSet is open.