You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "leolee (JIRA)" <ji...@apache.org> on 2013/09/06 05:39:52 UTC
[jira] [Created] (DERBY-6339) PreparedStatement resultset.next
performance problem
leolee created DERBY-6339:
-----------------------------
Summary: PreparedStatement resultset.next performance problem
Key: DERBY-6339
URL: https://issues.apache.org/jira/browse/DERBY-6339
Project: Derby
Issue Type: Bug
Components: JDBC
Affects Versions: 10.8.1.2
Environment: Win7 32bit,JDK1.7u21
Reporter: leolee
There is a table with 100,000 records,when I use PreparedStatement query from it,the query is fast and just cost 200ms. But the problem is when I fetch data from ResultSet,It's slow,takes about 1500 ms,but it's only 7 records in the resultset. The first 7 records is fast,I think it should break the loop when all the 7 records have fetched completely,but it's not,the last excution of "resultset.next()" takes more than 1400ms.
While on the other hand,I change to use Statement instead of PreparedStatement,when all 7 records have fetched out,the loop break immediately,plus the query time,all takes less than 200ms.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira