-
Notifications
You must be signed in to change notification settings - Fork 6
Preferred Engine
Thomas Shone edited this page Oct 24, 2021
·
3 revisions
Design
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.
ALTER TABLE t1 ENGINE=InnoDB;
- 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.