Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

questions about statement types and performace .

 
raminaa niilian
Ranch Hand
Posts: 551
  • 0
  • 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: 33697
316
Eclipse IDE Java VI Editor
  • 0
  • 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: 20196
26
MySQL Database
  • 0
  • 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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic