This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

[ResultSet] Scrollable vs Default

 
Muhammad Yasir Ch
Greenhorn
Posts: 27
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can someone explain perfromance comparison between Scrollable vs Default ResultSet ?
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your post probably belongs on the JDBC forums. I will move it there
 
Sunny Bhandari
Ranch Hand
Posts: 448
Eclipse IDE Firefox Browser Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Scrollable will allow you to traverse the fetched rows in any diection (backward and forward) using the next() and previous() methods.

The non scrollable version will throw some exception on using the previous() method.

You can define the type of resultset using the constructor (Not completely sure of this)

Write a sample program to verify that.
 
Muhammad Yasir Ch
Greenhorn
Posts: 27
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I create the resultSet by following but not sure what is the performance of scrollable resultSet on huge data set. So I need perfromance comparison in this regard.

conn.prepareStatement(qry, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic