codeigniter remote queries very slow

PHP
//Unless your app is very hard on the DB, 
//it is very likely that reverse DNS resolution is the cause. 
//Disable it on the remote server by adding 
//skip-name-resolve to your my.cnf

Source

Also in PHP: