NYCPHP Meetup

NYPHP.org

[nycphp-talk] p_connect

Hans Zaunere hans at nyphp.org
Tue Aug 5 09:14:00 EDT 2003



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





More information about the talk mailing list