A Comparison of Pros and Cons between InnoDB and MyISAM
MySQL has several table storage engines, but InnoDB and MyISAM are the main popular choices. This article compares their features, performance, advantages, and disadvantages.
Comparing InnoDB and MyISAM features and performance
- InnoDB is newer technology than MyISAM.
- InnoDB is more complex than MyISAM.
- InnoDB emphasizes data integrity, while MyISAM does not.
- InnoDB uses row-level locking for inserts and updates, while MyISAM uses table-level locking.
- InnoDB is transaction-based, while MyISAM is not.
- InnoDB supports foreign keys, while MyISAM does not.
- InnoDB recovers data better than MyISAM after a system crash.
- MyISAM supports full-text indexes, while InnoDB does not.
Comparing the advantages and disadvantages of MyISAM and InnoDB InnoDB advantages and disadvantages Advantages of InnoDB
- InnoDB emphasizes data integrity through relationship constraints and transactions.
- Inserts and updates are fast because row-level operation reduces waiting for inserts and updates.
Disadvantages of InnoDB
- Data model design is more complex than with MyISAM.
- It requires more system resources than MyISAM, so some recommendations advise disabling InnoDB if it is unused.
- It does not support full-text indexes.
MyISAM advantages and disadvantages Advantages of MyISAM
- Data models are easy to design, without having to worry about relationships between tables.
- It is much faster than InnoDB for simple data models.
- It supports full-text indexes.
- It is better suited to reads (select) than writes.
Disadvantages of MyISAM
- It does not check data integrity.
- It does not support transactions.
- It is much slower than InnoDB when the workload emphasizes inserts or updates.