• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

[ResultSet] Scrollable vs Default

 
Muhammad Yasir Ch
Greenhorn
Posts: 27
  • 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
  • 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
  • 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
  • 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);
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic