If you are using PHP as CGI, pconnect is no different than connect.

If you are using PHP as an Apache module, persistant connections can be of
some help. But if your own mysql, I don't reccommend you bother with
pconnect.

MySQL is extremely efficient at creating connections, unlike databases like
Oracle and PostgreSQL which have heavier connection processes.

If MySQL is on a different server than your webserver is on, then you still
may gain some positive result from using persistant connections, but it will
be nothing impressive and could cause bad things to happen if Apache and
MySQL are set in certain ways and the site get's hammered with requests.

Still, with MySQL it's just not much worth using persistant connections,
because the effect is just so minor.

If you use a slower connecting database or if it's located on another
server, then it may be a good idea.


In other words persistant connections are not so wonderful that everyone
should use them in every instance. You'll have to judge on a case by case
basis.


--
Plutarck
Should be working on something...
...but forgot what it was.


""elias"" <[EMAIL PROTECTED]> wrote in message
9c3fi6$edm$[EMAIL PROTECTED]">news:9c3fi6$edm$[EMAIL PROTECTED]...
> hello...
> just asking...what is better in this case:
> i got lots of scripts and almost all of them needs to connect to the DB
and
> some of thems are accessed lots of times what is better to use in such
> cases:
> mysql_connect() or mysql_pconnect()...
> i mean will speed factor play a role when lots and lots of user tries to
> connect to the DB?
>
> -elias
> http://eassoft.cjb.net
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to