Subject | Type 4 driver slow |
---|---|
Author | dctle2000 |
Post date | 2002-04-02T18:49:13Z |
I've just download the Type 4 driver from CVS and did a quick test.
I find it 2+ times slower than interclient-interserver 1.6.
Here is the code I used to retrieve data from the database:
...
long startTime = System.currentTimeMillis();
String sqlString = "SELECT FIELD1, FIELD2, FIELD3, FIELD4, FIELD5
FROM TABLE1";
Statement statement = DBCon.createStatement();
//should return 165,019 records
ResultSet resultSet = statement.executeQuery(sqlString);
while (resultSet.next()) {
String field1 = resultSet.getString("FIELD1");
String field2 = resultSet.getString("FIELD2");
String field3 = resultSet.getString("FIELD3");
String field4 = resultSet.getString("FIELD4");
String field5 = resultSet.getString("FIELD5");
};
statement.close();
long endTime = System.currentTimeMillis();
System.out.println("load table Time = " + (endTime - startTime));
...
Using interclient, it take 8762 ms
Using Type 4, it takes 22,151 ms
The fields queried are all type CHAR(4).
I find it 2+ times slower than interclient-interserver 1.6.
Here is the code I used to retrieve data from the database:
...
long startTime = System.currentTimeMillis();
String sqlString = "SELECT FIELD1, FIELD2, FIELD3, FIELD4, FIELD5
FROM TABLE1";
Statement statement = DBCon.createStatement();
//should return 165,019 records
ResultSet resultSet = statement.executeQuery(sqlString);
while (resultSet.next()) {
String field1 = resultSet.getString("FIELD1");
String field2 = resultSet.getString("FIELD2");
String field3 = resultSet.getString("FIELD3");
String field4 = resultSet.getString("FIELD4");
String field5 = resultSet.getString("FIELD5");
};
statement.close();
long endTime = System.currentTimeMillis();
System.out.println("load table Time = " + (endTime - startTime));
...
Using interclient, it take 8762 ms
Using Type 4, it takes 22,151 ms
The fields queried are all type CHAR(4).