[ http://issues.apache.org/jira/browse/DERBY-821?page=comments#action_12363723 ]
Knut Anders Hatlen commented on DERBY-821: ------------------------------------------ Thanks for your comments, Bryan. Because of the prefetching (default fetch size is 64) next is called four times on the server side, hence the the result set on the server is exhausted and can be closed if qryclsimp is true. If the result set on the client side also had to be exhausted before it could be closed on the server, we would have needed a separate round trip to communicate that and the closing wouldn't be implicit. > 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 > > 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