EmergencyEMERGENCY? Get 24/7 Help Now!

Quick tip: how to convert tables to InnoDB

 | July 30, 2008 |  Posted In: Insight for DBAs


I use Maatkit for a lot of grunt work and thought you might appreciate this quick tip. Suppose you have a bazillion tables to convert from MyISAM to InnoDB, but they are mixed in with other tables that are already InnoDB, or are another storage engine that you don’t want to touch.

Here’s a bonus tip, while I’m at it. I had a client a while back whose application creates tables as needed, so they had about 90,000 tables in a bunch of different databases, all named things like user_123_456_friends. I wanted to add an index to them — but not to the ones named friends_123_456_user.

Boy, is that a lot easier than adding indexes to 90k tables by hand!

Baron Schwartz

Baron is the lead author of High Performance MySQL. He is a former Percona employee.


Leave a Reply


Percona’s widely read Percona Data Performance blog highlights our expertise in enterprise-class software, support, consulting and managed services solutions for both MySQL® and MongoDB® across traditional and cloud-based platforms. The decades of experience represented by our consultants is found daily in numerous and relevant blog posts.

Besides specific database help, the blog also provides notices on upcoming events and webinars.
Want to get weekly updates listing the latest blog posts? Subscribe to our blog now! Submit your email address below and we’ll send you an update every Friday at 1pm ET.

No, thank you. Please do not ask me again.