Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm working on a C# application which connects to a MySql database residing on a computer on our local network. However, later on, our website will also connect to that database sometimes, so I have a port forwarding for Internet traffic to that database. But for some reason, connecting using the local IP address is slower than connecting using the Internet IP address 70.28.---.---. It's not really a big issue, but I'm just confused since I thought it would be the other way around.

share|improve this question
pls, define "slower". Is it the time it takes for a connection to be established. Is it the time it takes for a query to be executed. Is it the time needed for the actual data to be sent? – Sunny Jul 11 '11 at 18:45
Both, it is established slower in the queries are also a bit slower. I have a search function which search every time i change a text box, so when I use the local ip address my keys and results will not show up as soon as I type something, it will freeze for a while. However when using the internet IP address everything is fluid. – Saad Imran. Jul 11 '11 at 18:50
What happens if you use instead of the 192.x.x.x one? If 127 is better, than most probably you have some routing problem. – Sunny Jul 11 '11 at 19:24

This sounds like a routing / networking issue but there isn't enough detail in the question to make this a definite answer.


  • The 192.168.x.x IP address is in use by more than one host.
  • The routes for the two networks (192.168.x.x and 70.28.x.x) are different enough to affect performance (e.g. one has at least one leg via a saturated interface, or one leg that flaps)
  • The NAT or other translation you have for the various IP addresses affects throughput.

What would be useful for this would be a diagram of routers and networks, as well as routing tables for the hosts involved, that makes it clear which way packets go. (feel free to anonymize network identifiers, e.g. use A.B.C.D and E.F.G.H as IP addresses)

Also, see if you get a similar performance difference using ping or other common network tools with lower overhead than a database (e.g. HTTP server, ssh, etc. for getting an idea of TCP performance). If not, I'd look inside the database for the issue.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.