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
--
Emmanuel Cecchet
FTO @ Frog Thinker
Open Source Development & Consulting
--
Web: http://www.frogthinker.org
email: [email protected]
Skype: emmanuel_cecchet