Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I find if my a table is MyISAM or Innodb [duplicate]

Tags:

mysql

Possible Duplicate:
How can I check MySQL engine type for a specific table?

Assuming that users is a table following command does not reveal if users table is MyISAM or Innodb.

desc users;  

How do I find what is the type of users table?

like image 520
Nick Vanderbilt Avatar asked Sep 10 '10 01:09

Nick Vanderbilt


People also ask

How do I know if InnoDB is enabled?

The easiest way to check whether the InnoDB engine is enabled is to log in to phpMyAdmin, click the SQL tab, type the following command in the box: show engines; and click Go to execute the query and see the available storage engines. Next to InnoDB engine, in the Support row you will see Yes if InnoDB is enabled.

What is the difference between InnoDB and MyISAM?

InnoDB has row-level locking. MyISAM only has full table-level locking. InnoDB has what is called referential integrity which involves supporting foreign keys (RDBMS) and relationship constraints, MyISAM does not (DMBS). InnoDB supports transactions, which means you can commit and roll back.


1 Answers

You can use SHOW TABLE STATUS to see table information.

SHOW TABLE STATUS WHERE `Name` = 'my_table'; 

Simply check the value of the Engine column in the returned dataset to know which engine the table is using.

like image 131
Andrew Moore Avatar answered Oct 02 '22 05:10

Andrew Moore