Re: Freeing Memory

From: Date: Fri, 31 Jul 2009 10:43:49 +0000
Subject: Re: Freeing Memory
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-296103@lists.php.net to get a copy of this message
On Thu, 30 Jul 2009 10:42:26 -0400, Dan Shirah wrote: > I don't know what version of SQL you are using, but I have found that using: > > mysql_free_result($result); > mssql_free_result($result); > ifx_free_result($result); > > Helped my queries run much faster and use less resources. I had something > similar to your script where I would read lines from a huge file and then > insert the contents into my database. Before adding the above the process > would take 20-30 minutes. After freeing the results after each insert my > script completed in about 5-8 minutes. How does that work considering that mysql_query() only returns true or false on INSERT? I'd expect the script to fail on $result not being a valid resource. /Nisse

« previous php.general (#296103) next »