2

I was browsing through the MySQL Connector (5.1.24) source code and I noticed something unusual in the method StatementImpl#createStreamingResultSet

The javadoc says

We only stream result sets when they are forward-only, read-only, and the fetch size has been set to Integer.MIN_VALUE

@return true if this result set should be streamed row at-a-time, rather than read all at once.

This makes me believe that if we want to stream result sets in MySQL, then there is no option of retrieving rows in batches (say 100 at a time).

Is the assumption true that if the fetch-size is Integer.MIN_VALUE, then the results will be retrieved 1 row at a time? And wouldn't that be a performance hit?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.