Sup,
    PHP will automatically free results after the script finishes.

But, PHP has a memory cap, I think the default is 8megs -- check php.ini.

Anyway, so lets say you wanted to pull 2 large results sets.  You may get a
memory error.  So you could pull 1 result, do the necessary calculations,
free the result, fetch the next set, etc.

I doubt it would slow the script, but if you actually *needed* to use
it...the script would probably be pretty slow anyway.

SL.


----- Original Message -----
From: "Randy Johnson" <[EMAIL PROTECTED]>
To: "Rasmus Lerdorf" <[EMAIL PROTECTED]>; "Randy Johnson"
<[EMAIL PROTECTED]>
Cc: "Php-General" <[EMAIL PROTECTED]>
Sent: Friday, April 20, 2001 1:02 AM
Subject: RE: [PHP] mysql_free_result


> Does the Mysql_free_result slow down the script at all?
>
> Randy
>
> -----Original Message-----
> From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 20, 2001 8:49 PM
> To: Randy Johnson
> Cc: Php-General
> Subject: Re: [PHP] mysql_free_result
>
>
> > Does php release the memory used by the result set when it is done
> > executing?
>
> Correct
>
> > if so why should I use mysql_free_result()
>
> In case you are making multiple queries within the same script and want to
> keep your runtime memory usage low.
>
> -Rasmus
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to