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.

4
  • have you checked the database size, is your dev db a replication of test db? Commented Dec 8, 2011 at 15:10
  • @PrasannaTalakanti: yes, the db size is same, exact replica. Commented Dec 8, 2011 at 15:11
  • network latency - Did you test ping (ICMP) with the host name from the jdbc url? Commented Dec 8, 2011 at 15:16
  • @ollins: tested that as well, it's not that significant :( Commented Dec 8, 2011 at 15:18

1 Answer 1

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.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.