connect vs pconnect
am 08.12.2005 16:47:48 von Benjamin Adams
I'm trying to figure out if running mysql_connect or mysql_pconnect
would be faster.
Can someone explain the difference?
Picking one for a very high traffic website with a 10 G database.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: connect vs pconnect
am 08.12.2005 17:28:24 von Miles Thompson
Read the comments following the formal description at
http://www.php.ca/mysql_pconnect
They're pretty illuminating, and probably resulted from hard-earned experience.
Miles
At 11:47 AM 12/8/2005, Benjamin Adams wrote:
>I'm trying to figure out if running mysql_connect or mysql_pconnect
>would be faster.
>Can someone explain the difference?
>Picking one for a very high traffic website with a 10 G database.
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: connect vs pconnect
am 08.12.2005 21:38:34 von Robert Twitty
Based on my understanding of pconnect, it is a poor man's implementation
of connection pooling. Connection pooling requires a mediator server
between the client and database in order to maintain a connection for
reuse by another client. PHP does not provide such a server, so it uses
the web server as the mediator. When you call pconnect, the connection
resource will be retained within the web server's process space. Thus, the
connection will live as long as the web server lives.
-- bob
On Thu, 8 Dec 2005, Benjamin Adams wrote:
> I'm trying to figure out if running mysql_connect or mysql_pconnect
> would be faster.
> Can someone explain the difference?
> Picking one for a very high traffic website with a 10 G database.
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php