keesvanbreukelen
Programmer
When I run multiple mysql_query() commands over quite large tables, the memory usage goes up dramatically. The mysql_free_result() command does not seem to have any impact. I test using
echo memory_get_usage() . '<br />';
$rs = mysql_query($sql1);
echo memory_get_usage() . '<br />';
mysql_free_result($rs);
echo memory_get_usage() . '<br />';
$rs = mysql_query($sql2);
echo memory_get_usage() . '<br />';
mysql_free_result($rs);
echo memory_get_usage() . '<br />';
etc.
when I run the script on my local server (WAMP) memory appears to be released immediately. When I run it on the remote server (also Apache) I get the problem.
Kees
echo memory_get_usage() . '<br />';
$rs = mysql_query($sql1);
echo memory_get_usage() . '<br />';
mysql_free_result($rs);
echo memory_get_usage() . '<br />';
$rs = mysql_query($sql2);
echo memory_get_usage() . '<br />';
mysql_free_result($rs);
echo memory_get_usage() . '<br />';
etc.
when I run the script on my local server (WAMP) memory appears to be released immediately. When I run it on the remote server (also Apache) I get the problem.
Kees