db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "leolee (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DERBY-6339) PreparedStatement resultset.next performance problem
Date Fri, 06 Sep 2013 03:39:52 GMT
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:
         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

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

View raw message