Allow persistent MySQL connections
|Reported by:||mastermind||Owned by:|
Why not optionally allow persistent MySQL connections? Sometimes they can really help taking weight off the MySQL server.
in wp-config.php, add an option like:
in wp-includes/wp-db.php change around line 49:
$this->dbh = (DB_PERSISTENT == 'true') ? @mysql_pconnect($dbhost, $dbuser, $dbpassword) : @mysql_connect($dbhost, $dbuser, $dbpassword);
I don't know what effect this would on other servers/environments, but on an Apache with mod_php, it works very fine.