Re: [PDO] Question on Persistent PDO Connections

[email protected] (Christopher Jones) Thu, 05 Nov 2009 10:00:21 -0800
Newsgroups php.pdo
Message-ID <[email protected]>

Pierre Joye wrote:
 > hi,
 >
 > Pooled connections are not the same than persistent connections. They
 > even have nothing to do with the driver itself. However we do not have
 > a way to know that pooled connections are being used. That's something
 > we could add as well (sqlserver and oci use them for example).

With "DRCP" pooling in Oracle 11g, we tried to get away from the PHP
extension having to know or configure what the DB was doing with
servicing connections.

For Oracle Database, there isn't any feasible PHP setting that could
toggle whether to use a pooled connection.  The DBA would still need
to start the pool.  Without some query overhead requiring DBA
privileges PHP couldn't even tell if the pool is running.  Also the
connection string syntax (which is where the application toggles the
pooling option) could be quite complex to programmatically alter, or
in an external configuration file that PHP can't locate.

I don't think PDO should have a generic pooled/non-pooled toggle.

I believe the overall PHP ethos of non-persistent vs persistent
connections was that they should behave the same way to the
application; meaning that no assumption about the state of the
connection can be made, since it might be brand new.  I think this
should also be true for pooled connections.

In PDO, the application should just assume that a connection has been
established and nothing more.

Chris

-- 
Blog: http://blogs.oracle.com/opal
Twitter:  http://twitter.com/ghrd