db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philippe Hamelin" <philippe.hameli...@ens.etsmtl.ca>
Subject Performance problem
Date Sun, 11 Sep 2005 13:47:42 GMT
Hi,

I just did a test program to verify performance of derby. I tooks 23 seconds
to insert 500 rows in a table.

 

Here is the create table statement :

 

String sqlCreateTable = "CREATE TABLE test (oid INT, " +

                        "userName VARCHAR(100), " +

                        "password VARCHAR(100), " +

                        "firstName VARCHAR(100), " +

                        "lastName VARCHAR(100))";

 

Then I just called :

 

for(int i=0; i<500; i++) {

String userName = "user"+i;

      String password = "pass"+i;

      String firstName = "firstname";

      String lastName = "lastname";

 

      String sqlInsert = "INSERT INTO test VALUES("+i+", '"+userName+"',
'"+password+"', '"+firstName+"', '"+lastName+"')";

      Broker.executeUpdate(sqlInsert);

}

 

The broker is just a wrapper on the executeUpdate of Derby. Note that the 23
secondes only include this <for loop>.

 

I'm running on windows XP and my computer is a AMD Sempron 2600 with 768Mb
DDR400. Anything wrong ?

 

Thanks,

 

Philippe


Mime
View raw message