note 17188 deleted from function.mysql-pconnect by jimw
| From: | jimw@php.net | Date: | Fri, 07 Dec 2001 01:47:40 +0000 |
| Subject: | note 17188 deleted from function.mysql-pconnect by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-21788@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?