[thelist] PHP MySQL Connections
Maximillian Schwanekamp
lists at neptunewebworks.com
Thu Jan 27 19:03:14 CST 2005
Matt Warden wrote:
> Certainly opening multiple connections is going to be less efficient
> than simply passing a variable reference.
Yes, but I am wondering how *much* less efficient. Trying to gauge
whether I should go back and rewrite the code (not an easy task). If
it's just a "little" less efficient, I won't bother right now.
Obviously the answer to my question is very context-dependent, but it
seems that there are places in PHP where the execution time can be
slowed very much by minor differences in technique (e.g. using
ereg_replace vs preg_replace vs str_replace).
> Alternatively, you may find this helpful:
> http://us3.php.net/manual/en/features.persistent-connections.php
Yah, I'm already using mysql_pconnect(), so I know that each object's
connection to MySQL is persisting. But I am unclear on whether the
connections are specific to the objects creating them...?
Thanks for the help!
--
Maximillian Von Schwanekamp
Dynamic Websites and E-Commerce
NeptuneWebworks.com <http://www.neptunewebworks.com/>
voice: 541-302-1438
fax: 208-730-6504
More information about the thelist
mailing list