Posted by disappear.nz on 01/18/06 22:51
Persistant Connections:
The connection to the SQL server will not be closed when the execution
of the script ends. Instead, the link will remain open for future use
(mysql_close() will not close links established by mysql_pconnect()).
If you have alot of concurrent users on the site mysql_pconnect can
cause major resource issues.
The database library that is in discussion does not close the
connection after each query ie fetch_array.
The only time the mysql connection is closed is when either the object
is removed or the execution of the page terminates.
Most of the data-type returned from a mysql recordset field is string,
Building large arrays using string data types doesn't use alot of
memory nor impact performance really.
Also if you design your SQL statements correctly and efficiently you
shouldn't have this issue anyway.
I've since written a more advanced database library that uses a
singleton pattern,
the singleton pattern is useful when you are requiring only one
instance of that object across multiple objects.
I've found these librarys extermely efficient in programming and
performance,
You can view examples at.
http://sliterous.no-ip.org/php-libs/
[Back to original message]
|