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

2009-12-10 Thread Christopher Jones
Sara Leavitt wrote: > How about combining MySQLi with mysql_pconnect? Assuming both are > persistent, would those connections be shared? > The goal here is to use prepared statements. I read that MySQLi only > supports persistent connections in php version 5.3 which we are not yet > running, b

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

2009-12-10 Thread Sara Leavitt
How about combining MySQLi with mysql_pconnect? Assuming both are persistent, would those connections be shared? The goal here is to use prepared statements. I read that MySQLi only supports persistent connections in php version 5.3 which we are not yet running, but perhaps it would be worth

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

2009-12-10 Thread Christopher Jones
Andy Shellam (Mailing Lists) wrote: > "First, when connecting, the function would first try to find a > (persistent) link that's already open with the same host, username > and password. If one is found, an identifier for it will be returned > instead of opening a new connection." > > Therefore,

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

2009-12-10 Thread Andy Shellam (Mailing Lists)
> > One thing to be careful is if you are relying on 'transactions' to handle > anything. Obviously the transaction has to be in the same connection just to > work. Despite what others have said, the PDO connection will be different to > the generic mysql connection as it is a separate process

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

2009-12-10 Thread Lester Caine
Sara Leavitt wrote: So I can see that using two connections for updating might get out of synch; however, mixing the connections should be OK for a series of SELECT queries on the read-only side of the application, right? Yes - if you are only reading already stored data there should not be a

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

2009-12-10 Thread Sara Leavitt
So I can see that using two connections for updating might get out of synch; however, mixing the connections should be OK for a series of SELECT queries on the read-only side of the application, right? -Sara Lester Caine wrote: Sara Leavitt wrote: Hi Lester, Our application is not using php

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

2009-12-10 Thread Lester Caine
Sara Leavitt wrote: Hi Lester, Our application is not using php transactions (e.g., COMMIT, ROLLBACK etc.), so I think we are safe there. Are you saying that even if both the mysql_pconnect and PDO connection are persistent that they will be completely separate? (Havn't had a chance to tes

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

2009-12-10 Thread Sara Leavitt
Hi Lester, Our application is not using php transactions (e.g., COMMIT, ROLLBACK etc.), so I think we are safe there. Are you saying that even if both the mysql_pconnect and PDO connection are persistent that they will be completely separate? (Havn't had a chance to test this empirically ju

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

2009-12-10 Thread Lester Caine
Sara Leavitt wrote: Hi, We are about to convert all of our queries using mysql_pconnect to prepared statements using PDO database connections. It will take some time to convert the hundreds of SQL statements so the plan is to do it in phases. Is it a bad idea to have both a mysql_pconnect and

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

2009-12-09 Thread Andy Shellam (Mailing Lists)
> > 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/

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

2009-12-09 Thread Chris
Sara Leavitt wrote: Hi, We are about to convert all of our queries using mysql_pconnect to prepared statements using PDO database connections. It will take some time to convert the hundreds of SQL statements so the plan is to do it in phases. Is it a bad idea to have both a mysql_pconnect and

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

2009-12-09 Thread Sara Leavitt
Hi, We are about to convert all of our queries using mysql_pconnect to prepared statements using PDO database connections. It will take some time to convert the hundreds of SQL statements so the plan is to do it in phases. Is it a bad idea to have both a mysql_pconnect and a PDO connection open

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

2009-12-09 Thread Sara Leavitt
Hi, We are about to convert all of our queries using mysql_pconnect to prepared statements using PDO database connections. It will take some time to convert the hundreds of SQL statements so the plan is to do it in phases. Is is bad idea to have both a mysql_pconnect and a PDO connection op