We are upgrading a PHP project from MySQL to MySQLi. There are two servers, one web and one database. The database runs MySQL 5, the web server runs PHP 5.4. We have a development and production environment on the web server. The development environment was updated to use MySQLi and everything functions but the load times are very high. The same access in the production environment (same server/PHP version/MySQL version) is near instantaneous, about <1 second, while the development environment can take in excess of 30 seconds. It's the same query and eventually the data loads in the development environment, it's just very slow. I tried changing the hostname in the connect object from a hostname to IP, this did not make a difference. We tried persistent connections and that also made no difference.
All things being equal, it has to be something different between MySQL and MySQLi (or maybe the fact that both are installed on the same server?). Does anyone have a suggestion as to what we can look at to resolve this problem?