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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 a PDO
connection open for the same application?  Will this doubling of our
database connections for every page hit degrade performance?   Any tips
on the best way to transition to PDO/prepared statements with minimal
disruption?

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. Persistent connections will only reuse an already open connection, you can't connect two processes to the same connection. You would not know which process was accessing things.

--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux