Wednesday, July 9, 2008

MYISAM vs. InnoDB

Recently, I have to investigate differences between MYISAM and INNODB:

MYISAM: 
does not support transactions rollback and row level locking. 

INNO DB: 
supports above features as well as ACID (Atomicity, consistency, isolation, and durability).

To convert from MyISAM to InnoDB use script:

SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;
ALTER TABLE table_name1 TYPE = innodb;
ALTER TABLE table_name2 TYPE = innodb;
SET FOREIGN_KEY_CHECKS = 1;