Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google      Sign In   
  • Create Account

Subscribe to HRA Now!

 



Are you a Google Analytics enthusiast?

Share and download Custom Google Analytics Reports, dashboards and advanced segments--for FREE! 

 



 

 www.CustomReportSharing.com 

From the folks who brought you High Rankings!



Photo
- - - - -

Mysql_free_result() Function


  • Please log in to reply
2 replies to this topic

#1 piskie

piskie

    HR 7

  • Active Members
  • PipPipPipPipPipPipPip
  • 1,098 posts
  • Location:Cornwall

Posted 18 December 2011 - 05:27 AM

Can anyone please enlightem as to what are the implications are of not including the mysql_free_result() function at the end of a dynamically generated page that uses PHP and MYSQL.

#2 chrishirst

chrishirst

    A not so moderate moderator.

  • Moderator
  • 6,793 posts
  • Location:Blackpool UK

Posted 18 December 2011 - 09:34 AM

Nothing in particular, but it will free the memory resources that are being used by the query results and if your MySQL server and webserver are on the same hardware it means that the shared memory space is freeded up sooner and available to other processes.

If your queries are relatively inefficient, and/or the queries are returning large result sets it can make the application and server a little more responsive as the resources are released before the session ends.



#3 piskie

piskie

    HR 7

  • Active Members
  • PipPipPipPipPipPipPip
  • 1,098 posts
  • Location:Cornwall

Posted 19 December 2011 - 04:36 PM

Thanks Chris
That was a good guess of yours, my queries are almost always more evolutionary than structured and optimised. So I now know to go round and put the free_result in the pages where it's missing.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

SPAM FREE FORUM!
 
If you are just registering to spam,
don't bother. You will be wasting your
time as your spam will never see the
light of day!