[nycphp-talk] p_connect

Brian Pang bpang at
Tue Aug 5 09:59:48 EDT 2003

I've always used mysql_pconnect and haven't had any problems with it,
perhaps because, as you say, it works very quickly. I guess I copped the
pconnect style from original db connect scripts when I was first
learning and, since it wasn't broke, never thought about it again.

off the subject... maybe I should just DL my own copy of the PHP manual,
but is it me or is the site really slow right now?

> Daniel Kushner wrote:
> > Hi Matt,
> > 
> > The main reason would be if you have more Web processes than Database
> > connections. There just wouldn't be enough to go around :(
> >>
> >>Anyone know why you wouldn't use p_connect to make a connection
> >>to a database?
> >>It seems like it would be better than regular connect in every case.
> >>
> >>Or at least does anyone know of any problems with it?
> It depends on the DB for the most part.  PHP's integration with some
APIs, like OCI8 isn't 100% from what I've seen, and you can get stale
connections or other odd behavior.  On Oracle, this is important, since
creating and tearing down connections are extremely expensive.  With
MySQL, connections open and close very quickly, and I've found it rare
to see much benefit from persistent connections.
> H
> _______________________________________________
> talk mailing list
> talk at

More information about the talk mailing list