Re: mysql_pconnect / persistent database conections
| From: | Steve Slater | Date: | Fri, 28 Jan 2005 06:14:52 +0000 |
| Subject: | Re: mysql_pconnect / persistent database conections | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-207551@lists.php.net to get a copy of this message | ||
At 10:43 AM 1/27/2005, Richard Lynch wrote:
Ben Edwards wrote: Been meaning to investigate persistent database connections for a while. Coming from a rdbms background (oracle with a bit of whatcom sqlanywhare) I have always felt that the overhead of opening a connection at the beginning of each page was a little resource intensive.The mysql_pconnect() function should work well to solve the wasted resource/overhead you describe. But you should be aware that the pconnect function does not exist in the mysqli set of PHP functions. The mysqli functions allow you to access newer features of MySQL 4.1 and higher...like prepared statements. Here is the blurb from Zend: http://www.zend.com/php5/articles/php5-mysqli.php#fn1 Steve ------------------ Steve Slater slater@handsonsecurity.com Information Security Training and Consulting PHP / MySQL / Web App Security (LAMP) Training: http://www.handsonsecurity.com/training.html