Skip to content

Preferred Engine

Thomas Shone edited this page Oct 24, 2021 · 3 revisions

Issue Type

Design

Problem

InnoDB has been the preferred database engine since MySQL 5.7 (2015).

While MyISAM used to perform better in certain use cases (reads for instance), improvements to InnoDB over the last years have negated them.

Remediation

ALTER TABLE t1 ENGINE=InnoDB;

Considerations

  • InnoDB supports transactions, which means you can commit and roll back. MyISAM does not.
  • InnoDB has row-level locking. MyISAM has full table-level locking.
  • InnoDB has referential integrity which involves supporting foreign keys (RDBMS) and relationship constraints, MyISAM does not (DMBS).
  • InnoDB is more reliable as it uses transactional logs for auto recovery. MyISAM does not.

External Resources