This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why result set Interation takes huge amount of time

 
Mingyu Wei
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 21416
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"whiz", please check your private messages regarding a matter of administration.
 
Scott Selikoff
author
Saloon Keeper
Posts: 4028
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic