On Mon, 01 Aug 2005 17:21:10 GMT, "Angelos" <ad**********@redcatmedia.net>
wrote:
But i Don't really understand when to use the pconnect...
http://uk.php.net/manual/en/features...onnections.php
For non-persistent connections, the number of open connections is the number
of concurrent requests, so at maximum:
= Number of child processes/threads your webserver uses
The number of connections open to a database when using persistent connections
is related to:
Number of child processes/threads your webserver uses
*multiplied by*
Number of usernames used in scripts accessing the database server
If the number of usernames used is large, i.e. there's lots of different
scripts which each access different MySQL databases, then the number of
connections opened to the server and held open by the persistent connections
can get very high. This is usually the case in shared hosting; persistent
connections are often not a good idea on shared hosting.
Whereas if there's only a small number of databases accessed on the same
server, the number of connections may stay manageable, and so you can take
advantage of not having to open a new connection each time.
--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool