Re: mysql_free_result
| From: | Steve Lawson | Date: | Sat, 21 Apr 2001 21:33:57 +0000 |
| Subject: | Re: mysql_free_result | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-49703@lists.php.net to get a copy of this message | ||
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" <programmer@jennybug.com>
To: "Rasmus Lerdorf" <rasmus@php.net>; "Randy Johnson"
<programmer@jennybug.com>
Cc: "Php-General" <php-general@lists.php.net>
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:rasmus@php.net]
> 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: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>