Page 1 of 1

mysql_free_result Q

Posted: Tue Oct 05, 2004 8:27 am
by Calimero
I read the manual about this function:

mysql_free_result()

And I'm interested - for how big queries does this makes sense using and is it just for number of rows or certain types of queries.

Gonna have a DB of 2 000 000 entries :D - so need some more info on this function.

Thanks in advance.

Posted: Tue Oct 05, 2004 8:34 am
by Breckenridge
mysql_free_result() will free all memory associated with the result identifie. You only need to used it if you are concerned about how much memory is being used for queries that return large result sets.

Therefore, regardless of the size of your table, if your result is returning 10-20 rows then I don't think you have to use it.

if you do

Code: Select all

select * from table
and then let's say you put all the data into a text file then yes use mysql_free_result() after your script is done