File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and Relational Databases and the fly likes Why result set Interation takes huge amount of time Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Why result set Interation takes huge amount of time" Watch "Why result set Interation takes huge amount of time" New topic
Author

Why result set Interation takes huge amount of time

Mingyu Wei
Greenhorn

Joined: Jul 08, 2008
Posts: 1
Hello Everyone,

I am using Derby as my project's embedded database.

In the database, there are several tables storing 64k nodes related information.

After trying to issue a query (contains four table joins) against database, I found that it took huge amount of time

waiting for the step "resultset.next()" to be completed (I put some printout msgs before and after that call and from the console output, it looked like it was stuck in that step.)


Some environment information:

OS: Redhat Linux
Total memory is 2G
The derby database cache is 1.6G
The JVM heap size is 1.5G



Has anyone experienced that before?
Or do you have any ideas or suggestions on that?


Any suggestion is greatly appreciated!

whiz
[ July 09, 2008: Message edited by: Mingyu Wei ]
Paul Clapham
Sheriff

Joined: Oct 14, 2005
Posts: 19690
    
  10

"whiz", please check your private messages regarding a matter of administration.
Scott Selikoff
author
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3740
    
  10

Welcome to the world of database performance: never assume anything runs quickly. Since the JDBC code for next() is pretty trivial, the problem most likely lies in the database itself. Most commonly, if you add proper indexes (use a database performance tuning tool if you don't know which indexes to ad) will solve your problem although if its completely stuck, it may be a key locking issue.


[OCA 8 Book] [Blog]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Why result set Interation takes huge amount of time
 
It's not a secret anymore!