Use this script preferably with a cronjob to automatically optimize all the tables in your mysql databases. Under root privilleges the script will search for all the databases in your server and will optimize them all. Hope you will like it as it took me more than 3 hours to write it 🙂
Optimize all databases/tables in MySQL
For more tutorials you can refer here
Thanks for sharing that.
Very usefull script 🙂
No worries 😉
I will try to post more usefull stuff later.
Why are you don’t use mysqlcheck application? I think it will be easier to run this program from crontab with appropraite option. MOre detail are here:
mysqlcheck is a little slow, but the most important is that it can break tables that have unicode charsets.
Anyway this script optimizes only tables that want optimization, while the mysqlcheck optimizes everything.
Are you kidding me with the code coloring?
If you can’t read it, just copy/paste it somewhere my friend 🙂
Works beautifully. Implemented on all of my servers. Thanks. 🙂
I’ve found mention of how one should run a FLUSH TABLES after optimizing one’s db.
Why to flush tables after the optimizing process?
Pingback: Dr. Mikes Blog » Optimize MySQL
Pingback: Optimize MySQL « Dr. Mike’s Blog
This is exactly the piece of kit I was looking for. Thank you!
Schweet script. Fast. Thank you for writing it.
Pingback: Web 2.0 Announcer
Pingback: tending the garden » links for 2007-06-14
I have implemented this script on one of my blogs, thanks very much
Sweet script. Thanks!