I am accessing a database in MS Access using JDBC from my java program.The Ms Access Database has 1000 records.Now for each query it takes about 8 seconds.Is it normal?
I mean that is it not taking more time and how can I reduce this time.Thank you.
- You can create a connection at the start of your program, and keep using it.
- Check if you really need to loop over 1000 records. Can't you query a subset? You seldom need to retrieve 1000 records in a program.
- what are you doing inside your "while ( ResultSet.next())" loop? You are running that code 1000 times.
Check how long the executeQuery() line in your takes.
OCUP UML fundamental and ITIL foundation
He's giving us the slip! Quick! Grab this tiny ad!