MySQL Forums
Forum List  »  Performance

mysql connection speed.
Posted by: ismail arslan
Date: April 30, 2005 03:00AM

hi all,

i have database a driven code which connects to a mysql server located in my local network. i noticed that each query takes to 70-100 ms to run. this performance satisfies me. but there is a problem on connection.. the act of connection, takes 4700 ms in my local network, that is too much time for me (5 seconds!).. i discovered that something wrong in connector. because when i try to connect from a location on internet, it takes 5500 ms..

this is the code which i use:

try{
Class.forName("com.mysql.jdbc.Driver").newInstance();
conn = DriverManager.getConnection("jdbc:mysql://"
+ targetHost + "/schema1" , "root","passtimespass");

if(debug)
System.out.println("connect1: connected!");
}
catch(Exception e){

System.out.println("_____ Error occured on connect1 in DbObj");
System.out.println("_____ Error msg: " + e.getMessage());
}


what's the problem, and i how can i solve?

thanx.

Options: ReplyQuote


Subject
Views
Written By
Posted
mysql connection speed.
2581
April 30, 2005 03:00AM
1715
May 03, 2005 09:08AM
1797
May 03, 2005 09:38AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.