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!
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.