MyISAM 与 InnoDB 一些比较

MyISAM 与 InnoDB 一些比较

文档主要参考

MySQL 8.0

  1. MyISAM 参考
  2. InnoDB 参考
FeatureInnoDBMyISAM
B-tree indexesYesYes
Backup/point-in-time recovery (Implemented in the server, rather than in the storage engine.)YesYes
Cluster database supportNoNo
Clustered indexesYesNo
Compressed dataYesYes (Compressed MyISAM tables are supported only when using the compressed row format. Tables using the compressed row format with MyISAM are read only.)
Data cachesYesNo
Encrypted data (Implemented in the server via encryption functions. Data-at-rest tablespace encryption is available in MySQL 5.7 and later.)YesYes
Foreign key supportYesNo
Full-text search indexesYes (InnoDB support for FULLTEXT indexes is available in MySQL 5.6 and later.)Yes
Geospatial data type supportYesYes
Geospatial indexing supportYes (InnoDB support for geospatial indexing is available in MySQL 5.7 and later.)Yes
Hash indexesNo (InnoDB utilizes hash indexes internally for its Adaptive Hash Index feature.)No
Index cachesYesYes
Locking granularityRowTable
MVCCYesNo
Query cache supportYesYes
Replication support (Implemented in the server, rather than in the storage engine.)YesYes
Storage limits64TB256TB
T-tree indexesNoNo
TransactionsYesNo
Update statistics for data dictionaryYesYes