aspose file tools *
The moose likes JDBC and the fly likes [ResultSet] Scrollable vs Default Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "[ResultSet] Scrollable vs Default" Watch "[ResultSet] Scrollable vs Default" New topic
Author

[ResultSet] Scrollable vs Default

Muhammad Yasir Ch
Greenhorn

Joined: Oct 05, 2007
Posts: 27
Can someone explain perfromance comparison between Scrollable vs Default ResultSet ?


SCJP 6- 86%
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6662
    
    5

Your post probably belongs on the JDBC forums. I will move it there


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
Sunny Bhandari
Ranch Hand

Joined: Dec 06, 2010
Posts: 448

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.


Java Experience
Muhammad Yasir Ch
Greenhorn

Joined: Oct 05, 2007
Posts: 27
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);
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: [ResultSet] Scrollable vs Default