> > PMFJI, but has anyone done any testing to see if persistent > > connections with MySQL and PHP is actually faster in practice? > > Without testing, I suspect that it is faster but that the gains are > very small. If this was Oracle, it'd be a whole different story. The > connection overhead in MySQL is minimal.
With MySQL's thread_cache, the connection overhead is even lower. PHP's persistent connections can be good or bad. If you have a small site, low traffic, etc., it will help. If you have lots of traffic, then it can make more problems than it solves. PHP's implementation of persistent connections is flawed. A connection is persistent per process, not per server. Depending on you Apache variables, this can cause MySQL to have a _lot_ of useless threads running. And they take up memory. And that can slow things down and push MySQL to crash (setting a limit on MySQL connections solves this crash problem). Maybe with a new MySQL module for PHP in the works, this will get fixed. It needs to use shared memory so multiple apache processes can use the same connection pool. Sincerely, Steven Roussey http://Network54.com/?pp=e sql,query --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php