note 17188 added to function.mysql-pconnect

From: Date: Thu, 29 Nov 2001 04:19:38 +0000
Subject: note 17188 added to function.mysql-pconnect
Groups: php.notes 
Request: Send a blank email to php-notes+get-21402@lists.php.net to get a copy of this message
i did the benchmark on my win development box, because my mysql here was shutting down all the time. i've noticed that pconnect was creating a lot of processes, so i've changed my calls to connect with mysql_close allways. it solved my problems, so i can only figure out that pconnect wasn't working properly (apache 1.3.20, php 4.06 as module, mysql 3.23.44). running the above benchmark, in tables with 2 or 4.000 records i allways got the same result: mysql_connect is allways faster. here are my results for a table with 4.000 rows: ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ Executing 50 mysql_pconnect tests... pconnect time: 9.7731 Executing 50 mysql_connect tests... connect time: 0.0605 pconnect is [-16,065.64%] faster than connect ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ and for a table with 2 rows: Executing 50 mysql_pconnect tests... pconnect time: 0.2314 Executing 50 mysql_connect tests... connect time: 0.0609 pconnect is [-279.92%] faster than connect amazing, isn't it? -- http://www.php.net/manual/en/function.mysql-pconnect.php http://master.php.net/manage/user-notes.php?action=edit+17188 http://master.php.net/manage/user-notes.php?action=delete+17188 http://master.php.net/manage/user-notes.php?action=reject+17188

« previous php.notes (#21402) next »