1

I have a Java application which accesses a database. I tested it on my local machine with local database and it works just fine. But when I test it in our test environment where the application server and database server are differnt, the performence is terribly slow. The possible reasons I can think about are:

  • The time to get the database connection
  • Overall network traffic
  • Amount of data being selected and transferred
  • Load on the database server (other applications accessing the database).
  • Server configuration (e.g. memory allocated, connection pool size, etc.)

Which other reasons can affect the performance?

I am using JDBC with MySQL. Any help is appreciated.

Bhushan
  • 151
  • 9

1 Answers1

2

The most likely candidates are network latency and load. Is the database server being used by any other applications? What's the latency to the database server, and how much bandwidth is available?

I'd start the investigation with some query profiling on the DB server. You could easily compare query times on the production DB to your local to determine whether or not the server itself is a factor. If not, move on to profiling the network.

sarumont
  • 136
  • 4