Re[3]: [PHP-DEV] Major Bug in multiple MySQL Connections?
| From: | Daniel Lorch | Date: | Mon, 22 Apr 2002 18:02:02 +0000 |
| Subject: | Re[3]: [PHP-DEV] Major Bug in multiple MySQL Connections? | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-83153@lists.php.net to get a copy of this message | ||
hi,
this sounds reasonable. But why don't the "connection aliases" keep
the current db they are working on and if needed, switch back -
transparently to the user? The current implementation only confuses
people.
-daniel
----- Original Message -----
From : Rasmus Lerdorf [mailto:rasmus@lerdorf.ca]
Sent : Montag, 22. April 2002
Subject: [PHP-DEV] Major Bug in multiple MySQL Connections?
> It's not a silly behaviour. Database connections are a very limited
> resource, much more so than open files, and time after time we saw code
> that would open up multiple identical connections for no reason
> whatsoever. This is especially true of large apps that are able to swallow
> other apps. Like PHP-Nuke with various plug-in modules. If you patch 3 or
> 4 different things together that all talk to a DB on localhost, you do not
> need to go through the code and unify the database handling to avoid
> having 4 separate connections per request. PHP automatically optimizes
> that for you. Opening a new connection is also extremely expensive, much
> more so than a simple db switch call on an existing one.
> -Rasmus