Re: [PHP-DB] Combing PDO with mysql_pconnect connections in one application -- will this degrade performance?

[email protected] ("Andy Shellam (Mailing Lists)")
Newsgroups php.db
Message-ID <[email protected]>
> 
> As long as you test it (hopefully using some sort of automated tests) you should be right.
> 
> Since you're using persistent connections (make sure you set pdo to do the same), I don't think you're really doubling the number of connections.

Yeah, I think PDO uses the underlying mysql/pgsql functions anyway - it just provides a common API layer across all database types.

Therefore if you call mysql_pconnect outside of PDO, then call the same database server with PDO, technically it should realise the connection has already been made to that server and use your previous connection.

As Chris pointed out, make sure PDO will also use persistent connections.

Regards,
Andy
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.