Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

questions about statement types and performace .

 
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: 34071
331
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
Pie
Posts: 20719
30
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic