官网权威Innodb 与 MyISAM 区别总结

官网权威Innodb 与 MyISAM 区别总结

先总结一下:

  • InnoDB支持『事务』,MyISAM不支持

  • InnoDB支持『聚簇索引』,MyISAM不支持

  • InnoDB支持『数据缓存』,MyISAM不支持数据缓存

  • InnoDB支持『MVCC』(多版本控制锁),MyISAM不支持

  • InnoDB支持『外键』,MyISAM不支持

  • InnoDB从MySQL 5.6版本以后才支持全文索引,MyISAM一直支持

  • InnoDB从MySQL5.7版本以后才支持地理空间索引,MyISAM一直支持

  • InnoDB内部创建哈希索引来实现自适应哈希索引特性,MyISAM没有hash 索引

  • InnoDB支持『表锁 + 行锁』,MyISAM只支持『表锁』

  • InnoDB存储最大限制是64TB,MyISAM存储最大限制是256TB

一共是上述十点,对应的表格对比如下表格所示:

Table 15.1 InnoDB Storage Engine Features

FeatureSupport
B-tree indexes(其实这里指的是B+树)Yes
Backup/point-in-time recovery (Implemented in the server, rather than in the storage engine.)Yes
Cluster database supportNo
Clustered indexesYes
Compressed dataYes
Data cachesYes
Encrypted dataYes (Implemented in the server via encryption functions; In MySQL 5.7 and later, data-at-rest encryption is supported.)
Foreign key supportYes
Full-text search indexesYes (Support for FULLTEXT indexes is available in MySQL 5.6 and later.)
Geospatial data type supportYes
Geospatial indexing supportYes (Support for geospatial indexing is available in MySQL 5.7 and later.)
Hash indexesNo (InnoDB utilizes hash indexes internally for its Adaptive Hash Index feature.)
Index cachesYes
Locking granularityRow
MVCCYes
Replication support (Implemented in the server, rather than in the storage engine.)Yes
Storage limits64TB
T-tree indexesNo
TransactionsYes
Update statistics for data dictionaryYes
FeatureSupport

表格来源

Table 16.2 MyISAM Storage Engine Features

FeatureSupport
B-tree indexesYes
Backup/point-in-time recovery (Implemented in the server, rather than in the storage engine.)Yes
Cluster database supportNo
Clustered indexesNo
Compressed dataYes (Compressed MyISAM tables are supported only when using the compressed row format. Tables using the compressed row format with MyISAM are read only.)
Data cachesNo
Encrypted dataYes (Implemented in the server via encryption functions.)
Foreign key supportNo
Full-text search indexesYes
Geospatial data type supportYes
Geospatial indexing supportYes
Hash indexesNo
Index cachesYes
Locking granularityTable
MVCCNo
Replication support (Implemented in the server, rather than in the storage engine.)Yes
Storage limits256TB
T-tree indexesNo
TransactionsNo
Update statistics for data dictionaryYes

表格来源

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值