Mysql – What are the main differences between InnoDB and MyISAM

innodbmyisamMySQL

What are the main differences between InnoDB and MyISAM?

Best Answer

First major difference I see is that InnoDB implements row-level lock while MyISAM can do only a table-level lock. You will find better crash recovery in InnoDB. However, it doesn't have FULLTEXT search indexes until v5.6, as does MyISAM. InnoDB also implements transactions, foreign keys and relationship constraints while MyISAM does not.

The list can go a bit further. Yet, they both have their unique advantages in their favor and disadvantages against each other. Each of them is more suitable in some scenarios than the other.

So to summarize (TL;DR):

  • InnoDB has row-level locking, MyISAM can only do full table-level locking.
  • InnoDB has better crash recovery.
  • MyISAM has FULLTEXT search indexes, InnoDB did not until MySQL 5.6 (Feb 2013).
  • InnoDB implements transactions, foreign keys and relationship constraints, MyISAM does not.