Bug #83027 Update ResultSet section to discuss FetchSize and useCursorFetch
Submitted: 16 Sep 2016 22:25 Modified: 2 Aug 2017 18:58
Reporter: monty solomon Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / J Documentation Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: CPU Architecture:Any

[16 Sep 2016 22:25] monty solomon
Description:
The documentation page states that ResultSets are completely retrieved and stored in memory or that they could be streamed back one row at a time. It does not show the option of using a FetchSize > 0 with useCursorFetch=true to retrieve subsets of the ResultSet.

How to repeat:
View this page

JDBC API Implementation Notes
https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-reference-implementation-notes.ht...

ResultSet

By default, ResultSets are completely retrieved and stored in memory. In most cases this is the most efficient way to operate and, due to the design of the MySQL network protocol, is easier to implement. If you are working with ResultSets that have a large number of rows or large values and cannot allocate heap space in your JVM for the memory required, you can tell the driver to stream the results back one row at a time.

View this page

Driver/Datasource Class Names, URL Syntax and Configuration Properties for Connector/J
https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-reference-configuration-propertie...

useCursorFetch

If connected to MySQL > 5.0.2, and setFetchSize() > 0 on a statement, should that statement use cursor-based fetching to retrieve rows?

Suggested fix:
Update the ResultSet section of the JDBC API Implementation Notes to discuss retrieving subsets of a ResultSet.
[19 Sep 2016 11:31] Chiranjeevi Battula
Hello monty,

Thank you for the bug report.
Verified based on internal discussion with dev's.

Thanks,
Chiranjeevi.
[2 Aug 2017 18:58] Daniel So
Posted by developer:
 
The Connector/J 5.1 and 8.0 manuals have been updated as suggested.