MyISAM manages nontransactional tables. It provides high-speed storage and retrieval, as well as fulltext searching capabilities. Each MyISAM
table is stored on disk in three files. The files have names that begin with the table name and have an extension to indicate the file type. An .frm
file stores the table format. The data file has an .MYD
(MYData
) extension. The index file has an .MYI
(MYIndex
) extension. Each MyISAM table is stored in a separate file, which could be compressed then with myisamchk if needed.
With InnoDB the tables are stored in tablespace and not much further optimization is possible. All data except for TEXT and BLOB can occupy 8,000 bytes at most. No full text indexing is available for InnoDB. The COUNT(*) execute slower than in MyISAM due to tablespace complexity. InnoDB
is a transaction-safe (ACID compliant) storage engine for MySQL that has commit, rollback, and crash-recovery capabilities to protect user data.
So in short,
- InnoDB uses row locking, MyISAM uses table locking, therefore…
- InnoDB is slower when it comes to SELECT
- InnoDB enforces referential integrity (which is as very good thing)
- InnoDB allows transaction