How does resultset behave ?

I have a method which iterates over result set.

If the resultset fetchsize is increased to 2000, the method takes less time, so I wondered :

If the result set is 80 and I had a fetch size of only 8 , then would the app hit the database after every 8 records it fetched ?

Thank you.
letsbedecentAsked:
Who is Participating?
 
objectsConnect With a Mentor Commented:
yes, each time new rows are needed by the result set another 8 rows would be fetched.
0
 
letsbedecentAuthor Commented:
So, that would add the time taken to iterate through the result set, especially if the network latency between app server and db server is not negligible ?
0
 
objectsCommented:
correct
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.