aspose file tools*
The moose likes JDBC and the fly likes Performance question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Performance question" Watch "Performance question" New topic
Author

Performance question

Jennifer Sohl
Ranch Hand

Joined: Feb 28, 2001
Posts: 455
I have a JTree that is being populated via a ResultSet everytime the user presses the button.
On my PC, when I run it, it takes the tree about 8 seconds to come up.
I tried two other PC's this app is running on, one of them took 14 seconds, and the other, only took 4 seconds to come up.
I guess my question is, why is the performance really fast on one machine, and really dumpy on another?
I thought maybe the stored procedure was causing the poor performance, but is this possible, even though on a different PC, it is much much faster?
Is it maybe more of a PC issue rather than a database issue?
Thanks for any help you can give me!
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8927
    
    9

Originally posted by Jennifer Sohl:

Is it maybe more of a PC issue rather than a database issue?

Very much so. There are a number of factors that impact computer performance. Processor speed, bus speed, memory cache, available RAM, number and load of other applications and so on. Database calls usually start off CPU-bound, that is, their performance is limited by CPU speed, but very quickly become memory-bound, since every table in a query has to be passed through RAM during the query. You can use the task manager in Windows or "top" in Linux to watch the load your application puts on a computer. If you can hear the hard drive churning when you run your query, you have run out of memory and the CPU is wasting cycles swapping RAM to disk and vice versa. In the business world it is almost always cheaper to solve such performance problems by buying newer/better hardware than to spend developer time chasing bottlenecks.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Jennifer Sohl
Ranch Hand

Joined: Feb 28, 2001
Posts: 455
Thanks!
 
jQuery in Action, 2nd edition
 
subject: Performance question