db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Cecchet <m...@frogthinker.org>
Subject Re: Performance issue of derby using JDBC
Date Mon, 15 Dec 2008 18:05:43 GMT
Harshad wrote:
> Harshad wrote:
>> These seem to have paid off; the actual query time
>> (statement.executeQuery) is pretty fast : about 1 or 2 milliseconds.
>> But reading from the resultSet using APIs such as getString, getLong,
>> takes about 250 ms or more!!
> Forgot to mention; the query usually (99%) results in just a singe row. The 250ms is
consumed in just reading the data from that single row
Are you using getString("columnName") or getString(1) to access the result?
Some databases only fetch ResultSetMetaData (including column names) 
when it needs them. Using the column index can dramatically improve 
performance. I am not sure if this is the case with Derby.


Emmanuel Cecchet
FTO @ Frog Thinker 
Open Source Development & Consulting
Web: http://www.frogthinker.org
email: manu@frogthinker.org
Skype: emmanuel_cecchet

View raw message