Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Suppose I am a selecting 100k rows from a mysql table using following java code

           Statement stmt=con.createStatement();
           ResultSet rs=stmt.executeQuery(sqlSelectQuery);

then does it means

  1. MySQL server take the entire result of select at once in its memory, and FETCH_SIZE rows to JVM heap, and transfer data from result stored at mysql server memory to JVM heap or
  2. MySQL server take FETCH_SIZE rows of query at once in its memory, and at each network round trip, server querying the rows and transfer all data to JVM heap.
share|improve this question
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.