rondog Posted October 15, 2008 Share Posted October 15, 2008 On a table I have recently built, their are a lot of requests of update and delete. I found this causes overhead which my table was showing. I found that: mysql_query("OPTIMIZE TABLE $table") or die(mysql_error()); takes the overhead away. Is it safe to run that after every UPDATE or DELETE? Quote Link to comment https://forums.phpfreaks.com/topic/128557-phpmyadmin-overhead/ Share on other sites More sharing options...
fenway Posted October 15, 2008 Share Posted October 15, 2008 It's a bad idea to run this regularly, since it locks the table... every few weeks would be fine. Quote Link to comment https://forums.phpfreaks.com/topic/128557-phpmyadmin-overhead/#findComment-666370 Share on other sites More sharing options...
rondog Posted October 15, 2008 Author Share Posted October 15, 2008 Is their an automated process of doing this? like run it the first of every month? Quote Link to comment https://forums.phpfreaks.com/topic/128557-phpmyadmin-overhead/#findComment-666501 Share on other sites More sharing options...
cx323 Posted October 16, 2008 Share Posted October 16, 2008 If you're on a linux machine you can use cron to schedule a script to run at certain times. http://www.clickmojo.com/code/cron-tutorial.html Quote Link to comment https://forums.phpfreaks.com/topic/128557-phpmyadmin-overhead/#findComment-666798 Share on other sites More sharing options...
rondog Posted October 16, 2008 Author Share Posted October 16, 2008 Nope not on a linux machine. I am on a 1and1 shared host in fact. Quote Link to comment https://forums.phpfreaks.com/topic/128557-phpmyadmin-overhead/#findComment-667445 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.