note 70105 rejected from function.mysql-free-result by nlopess
| From: | nlopess@php.net | Date: | Tue, 03 Oct 2006 17:29:15 +0000 |
| Subject: | note 70105 rejected from function.mysql-free-result by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-117993@lists.php.net to get a copy of this message | ||
Note Submitter: wes at powerhousestudios dot ca
----
this function is awesome. as far as i can tell, the "Open Tables" field from the
mysql_stat() function updates faster than without it.
i was having problems with too many connections to a database, so i duplicated that db across
different servers. i then made a php page that, judging by the "Open Tables" field,
decides which server to connect to using a tiered system. sometimes the "Open Tables"
would get super high, and i'd have to get it to delay connecting to any db at all to give the
servers some time to recupe, and once the dbs' "Open Tables" dropped below my set
max, it would carry on with the connection delegations.
ever since i added mysql_free_result() in, it has been noticeably faster at recovering from high
"Open Tables".
im sure i'll be putting this function alongside my mysql_close()'s, cuz why the heck not?