> I profiled my PHP app with a debugger A single session and a few queries does not make a very good test. The reason for persistent connections is to scale web apps to handle intense multi-user activity like 1000 queries per second or 100's or even 1000's of concurrent database connections. Do a for..loop that launches 1000 *nix background processes each of which has a suite of queries with slightly different values in the where clause. You need to look at overall performance of the database server and its ability to handle the load of many concurrent users using different connection and/or programming techniques. The best implementation I've seen is where the connection pooling function was written in C in a 3 tier architecture having a web server, a db server, and an application server where the connection pooling was done... VERY scalable, just like the fish I like to catch.
-----Original Message----- From: mos [mailto:[EMAIL PROTECTED]] Sent: Friday, August 16, 2002 10:36 AM To: John Wards Cc: [EMAIL PROTECTED] Subject: Re: Persisten Connections At 08:40 AM 8/14/2002, you wrote: >I am running a website which generates around 100,000 pageviews a day and I >am wondering if I stop using persistent conections to the MySQL database and >use >normal open and close conections this would reduce the load onto my server? > >Most conections are either made through my "main" file or the phorum message >board system. > >Thanks in advance >John Wards John, I profiled my PHP app with a debugger and discovered connecting to MySQL 4.x with persistent connections actually took 50% longer than non-persistent connections. (It added an extra 80ms to connect). So I don't see why persistent connections is useful at all with MySQL. Mike --------------------------------------------------------------------- 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 --------------------------------------------------------------------- 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