I have a c# windows application which uses MySQL database when I work in LAN (Locally with DB Server) it works fine but when I access to database server through the internet the delay on query execution is to much.
-
So, is on C# 4 or C# 3 ?ajreal– ajreal2011-09-07 13:44:15 +00:00Commented Sep 7, 2011 at 13:44
-
Typically accessing over the internet is slower. Have you done any timing? Do you know if the database you are hitting over the internet is slower in your queries or if it's just the time to send data over the wire? What is the nature of your data - could you compress it, or maybe choose to get less data? Lots more information would be great.Prescott– Prescott2011-09-07 13:49:17 +00:00Commented Sep 7, 2011 at 13:49
-
Prescott I am using this kind of connection: public OdbcConnection getConnection() { OdbcConnection con = new OdbcConnection(); string ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};Server="+server+";Database=database;Uid="+username+";Pwd ="+password+";"; try { con.ConnectionString = ConnectionString; } catch (Exception ex) {} return con; } Delay in query execution is about 3 secstar– star2011-09-07 14:23:24 +00:00Commented Sep 7, 2011 at 14:23
-
@star: mabe it's only dns. did you try to connect to ip-address ? second question: did your query timeout ? btw. 3 seconds is not slow.ralf.w.– ralf.w.2011-12-07 19:26:53 +00:00Commented Dec 7, 2011 at 19:26
Add a comment
|