• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Why result set Interation takes huge amount of time

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"whiz", please check your private messages regarding a matter of administration.
 
author
Posts: 4335
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic