[ http://issues.apache.org/jira/browse/DERBY-821?page=all ]
Knut Anders Hatlen updated DERBY-821: ------------------------------------- Attachment: DERBY-821.diff DERBY-821.stat changes.html I have attached a patch (DERBY-821.diff) which lets the client driver take advantage of the possibility to have result sets implicitly closed on the server. In many cases, this saves one round trip per select operation. Inspired by the thoroughness certain developers have shown lately, I have also uploaded a document describing the most important parts of the patch in the hope that it is useful for reviewers. See the attached file "changes.html". I have done some testing of the performance. With simple single-record select operations, there seems to be a clear increase in performance. Having test clients running transactions similar to this one (autocommit off) ResultSet rs = ps.executeQuery(); rs.next(); int id = rs.getInt(1); String text = rs.getString(2); rs.close(); conn.commit(); the number of round trips per transaction was reduced from four to three. The effect on the throughput depended very much on the number of clients. With few (1-3) clients, the throughput increased by 24%. With more than 20 clients, the increase in throughput was between 5% and 7%. Derbyall passed more or less cleanly. I had four failures: - ConcurrentImplicitCreateSchema failed with timeouts - dataSourcePermissions_net failed with shutdown exception in the DerbyNet framework - runtimeinfo failed because it had two active sessions instead of one. Happened in both DerbyNet and DerbyNetClient All of these failures are frequently seen in Ole's regression tests. > Client driver: Implicitly close exhausted result sets on the server > --------------------------------------------------------------------- > > Key: DERBY-821 > URL: http://issues.apache.org/jira/browse/DERBY-821 > Project: Derby > Type: Improvement > Components: Network Client, Network Server, Performance > Versions: 10.2.0.0 > Reporter: Knut Anders Hatlen > Assignee: Knut Anders Hatlen > Priority: Minor > Fix For: 10.2.0.0 > Attachments: DERBY-821.diff, DERBY-821.stat, changes.html > > Forward-only result sets that are exhausted should be implicitly > closed on the server. This way, ResultSet.close() does not have to > send an explicit close message generating unnecessary network traffic. > The DRDA protocol supports this. From the description of OPNQRY (open > query): > The qryclsimp parameter controls whether the target server > implicitly closes a non-scrollable query upon end of data (SQLSTATE > 02000) in association with the cursor type. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira