Inspecting a MySQL database’s storage engine

Ever wonder what engine your MySQL database tables are stored in? Each table has its own engine setting, it’s not global per database. Use this query to find out what engine each of your tables is using:

SELECT table_name,engine FROM information_schema.tables;

And if you want to, for example, update the users table to use the InnoDB engine, use something like this:

ALTER TABLE users ENGINE=innodb;

on 07/09/2009 | permalink | comments

blog comments powered by Disqus