How to increase performance?

Hi guys,

I am using NetBeans for development, i have a combo box for which i am populating data from code, where it will fetch data from a sql table and add it via code and display in my UI, but this process is taking very long time to show values. How can i increase performance so that it displays values fast.

I have nearly 30 values to show up as off now, but in real time it will be less than 10 or 15 max.

The time it takes to connect to a relational database can be mitigated by connecting once and reusing the connection over time.

But usually performance issues for such a trivial amount of data are caused by a bad execution plan with your SQL and relational database. Check to see how long the SQL statement(s) take to execute. Assuming that this is the problem... Do your tables have any indexes? Work with your local Database Administrator (DBA) to optimize the performance of your SQL.

I like the idea of being asked to improve the performance of a (largely) unspecified piece of code.

My car doesn't go fast enough, can anyone make it go faster?
To which the answer could be "stand on the accelerator", "change gear", or even "don't leave the handbrake on".

It's strange: you need a drivers licence to legally drive a car but you don't need anything to play with a computer and ask preposterous questions at any forum ... Sometimes I'd like to call for a revolt. Some people are simply not made for the job ...

kind regards,

Jos

I have the stamina of a seal; I lie on the beach instead of running on it.

It's strange: you need a drivers licence to legally drive a car but you don't need anything to play with a computer and ask preposterous questions at any forum ... Sometimes I'd like to call for a revolt. ...

1. It's unlikely that anyone will get anyone killed by writing code that doesn't even compile. ;->

2. With cars, sometimes the answer is, "It works better if you start the engine, and put it in gear." ;->