Win a copy of Android Programming: The Big Nerd Ranch Guide this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

questions about statement types and performace .  RSS feed

 
raminaa niilian
Ranch Hand
Posts: 551
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which type of result set has best performace for a read only purpose ?
is it wise to use

ResultSet.TYPE_SCROLL_INSENSITIVE , ResultSet.CONCUR_READ_ONLY
i just want to retrive one column of one record (my query will return just one record)

thank you
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 36864
481
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Raminaa,
ResultSet.TYPE_FORWARD_ONLY , ResultSet.CONCUR_READ_ONLY is best here. You don't need any scrolling capability or to update the data.
 
Paul Clapham
Sheriff
Posts: 22215
38
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's true. Personally I only ever use forward-only, read-only result sets. However if your query is only returning one record, the choice is going to make almost no difference in practice.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!