Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

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

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Quick! Before anybody notices! Cover it up with this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!