This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes rset.next() takes long time for 11000 rows. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "rset.next() takes long time for 11000 rows." Watch "rset.next() takes long time for 11000 rows." New topic
Author

rset.next() takes long time for 11000 rows.

saroja dendukuri
Greenhorn

Joined: Aug 08, 2001
Posts: 2
I am using informix database and trying to retrieve 11000 records with 19 columns which I think is taking long time(like my whole program is taking 16 min of which rset.next() is taking more time). Query is executed pretty fast but rset.next() is like I can notice the time its taking to be done. Can you suggest some ways to make this retreive fast?
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

i don't know what settings you already have but here are some general tips:
1. play with the setFetchSize(int i); method to optimize large resultsets
2. Do not use a scrollable resultset. They are slower.
3. set the connection transaction isolation level to the lowest possible setting without compromising data integrity:
setTransactionIsolation(TRANSACTION_READ_UNCOMMITTED);
you might get some more bites in the performance forum.
Jamie
saroja dendukuri
Greenhorn

Joined: Aug 08, 2001
Posts: 2
I already set my block size while fetching the data.
What is a scrollable resultset?
I am just using a simple query and not using any stored procedures or triggers to set the autocommit.(i read it on internet)
[This message has been edited by saroja dendukuri (edited August 09, 2001).]
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

scrollable: allows you to move forwards, backwards and to any absolute position in the resultset. If you haven't explicitly declared it in your statement then the default is TYPE_FORWARD_ONLY(which is faster when iterating through a resultset).
Jamie
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: rset.next() takes long time for 11000 rows.
 
Similar Threads
Run-time deployment is faster for mdb??
format the output of a query to two decimal points
which servlet container?
Hibernate, too slow, what's wrong?
XMLEnocder.writeObject() and XMLEnocder.flush() are taking long time