Re: DB package - performance question

From: Date: Wed, 09 Jul 2008 20:53:09 +0000
Subject: Re: DB package - performance question
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-50377@lists.php.net to get a copy of this message
On Jul 9, 2008, at 2:24 AM, liran tal wrote:
How does that impact on performance?
So two of the biggest problems with performance with regards to this are: 1.) Authentication - Each of those open connections needs to be authenticated, which is horribly inefficient in MySQL (and most DB's; Oracle is atrocious for instance). 2.) Round Trips - Each time you send an open / close that's another round trip to your DB server (assuming it's on another server). Building up and tearing down connections costs time as does the network latency of sending those requests. A DB connection is a *perfect* use of the singleton pattern. I'd recommend looking that up and using it. :) Good luck! --Joe

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