DB package - performance question

From: Date: Wed, 09 Jul 2008 09:24:44 +0000
Subject: DB package - performance question
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-50376@lists.php.net to get a copy of this message
Dear Dev's, I wanted to get a clue about the performance issues with opening/closing a database connections. For a certain PHP page I could go up to running about 10 sql queries which are defined in different functions and so it happens that in each function I open/close the database connection. How does that impact on performance? And another question comes to mind - is it wise to open the database and close just once for each user session/login? (i.e: open it once at the logging successful stage and close it when the user logs out/session is destroyed cause of timeouts) Regards, Liran.

« previous php.pear.dev (#50376) next »