We help IT Professionals succeed at work.

How does resultset behave ?

letsbedecent
letsbedecent asked
on
Medium Priority
529 Views
Last Modified: 2008-02-01
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.
Comment
Watch Question

Java Developer
CERTIFIED EXPERT
Top Expert 2010
Commented:
yes, each time new rows are needed by the result set another 8 rows would be fetched.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

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 ?
Mick BarryJava Developer
CERTIFIED EXPERT
Top Expert 2010

Commented:
correct
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.