Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Few days ago, we moved our mysql database to another host because of some limitations with our current host. Everything is fine (Seem same performance and speed on our PHP framework based website) except one script that executes a mass update between two tables and excel files. This script would take less than 3 hours to update inventory before(PHP and mysql were hosted on same company). But, same script is taking about 9/10+ hours to update inventory in new database server(that's the only change we made and database is now hosted on another company). I just know that performance can depend on mysql server version too. But, is not that too much? Could I improve that?

share|improve this question
    
Do you have the same type of connectivity between the two hosts as you did before? –  NickW Jun 21 '13 at 14:16
    
Yes, it is php PDO and mysql. –  Robi Jun 21 '13 at 14:17
    
No, I mean physical connectivity, what makes you think that a long distance connection should run as well as something hosted on the same machine? –  NickW Jun 21 '13 at 14:18
    
I do not know. But i just guessed that our website could have slower speed than before since it is totally hosted on another different server. Is that normal? even 3x/4x slower speed? –  Robi Jun 21 '13 at 14:23
    
Considering it's pulling tons of data across the Internet then to you, it's normal and expected. That's why you normally have databases and web servers together. –  Nathan C Jun 21 '13 at 14:25
add comment

1 Answer

up vote 0 down vote accepted

If the servers are no longer located together in the same hosting, it is fairly normal that things will be slower. There are things you can do to reduce overhead, like connection pooling, and ensuring that the mysql connection has dedicated bandwidth, but it's doubtful you'll be able to reproduce the sort of speed and bandwidth you had between two machines in a single data center.

The other thing you could try is running the update script entirely on a machine located in the same DC as your MySQL server.

share|improve this answer
    
Your answer is completely right. Thank you for explaining in detail. –  Robi Jul 14 '13 at 11:13
add comment

Your Answer

 
discard

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.