In general, this is not specified and, therefore, may depend on the database (and the JDBC driver).
A JDBC implementation that always contains all the rows in memory will have problems with really large results, while implementations that retrieve each row individually will have poor performance (at least if the database is located somewhere remotely).
Thus, most implementations retrieve data in blocks of some size, depending on the implementation. I have no idea what any MySQL JDBC drivers could do.
source share