Newbie: optimizing my server"s memory use (avoiding memory leaks)
am 19.10.2005 12:36:56 von tarmstrongHi.
Using Perl v5.8.5 with DBI-1.47 on Linux.
I've developed some Perl scripts which are executed by crons and
handle data by using MySQL. I want to optimize my server's memory
use and would like to avoid and find memory leaks.
I use this code:
----------
$DB =3D DBI->connect ("DBI:mysql:database=3D$DBNAME:host=3D$DBHOST",
$DBUSER, $DBPASS)
or die "Can't connect to database:$DBI::errstr\n"=
;
while(@r1 =3D $q1->fetchrow_array( )) {...}
$q1->finish;
$DB->disconnect;
---------
Must I compulsory close connections and free memory? Is there another way
to optimize memory use?
Thank you very much.