本文共 3149 字,大约阅读时间需要 10 分钟。
1. MyISAM:这种引擎是mysql最早提供的。又可以分为静态MyISAM、动态MyISAM 和压缩MyISAM三种:
但是,不管是何种MyISAM表,目前它都不支持事务、行级锁和外键约束的功能。
2. MyISAM Merge引擎:这种类型是MyISAM类型的一种变种。合并表是将几个相同的MyISAM表合并为一个虚表。常应用于日志和数据仓库。
3. InnoDB:InnoDB表类型可以看作是对MyISAM的进一步更新产品,它提供了事务、行级锁机制和外键约束的功能。
4. memory(heap):这种类型的数据表只存在于内存中。它使用散列索引,所以数据的存取速度非常快。因为是存在于内存中,所以这种类型常应用于临时表中。
5. archive:这种类型只支持select 和 insert语句,而且不支持索引。常应用于日志记录和聚合分析方面。
6. CSV: 这种类型的存储引擎利用冒号分割值的格式将数据存在文本文件上。我们可以利用CSV存储引擎方便的对遵照CSV格式的数据进行导入导出或者与其他软件进行数据交换
当然MySql支持的表类型不止上面几种。
来源:Mysql官网
tip:Byte、KB、MB、GB、TB、PB、EB、ZB、YB、DB、NB。
Feature | MyISAM | Memory | InnoDB | Archive | NDB |
---|---|---|---|---|---|
Storage limits | 256TB | RAM | 64TB | None | 384EB |
Transactions | No | No | Yes | No | Yes |
Locking granularity | Table | Table | Row | Row | Row |
MVCC | No | No | Yes | No | No |
Geospatial data type support | Yes | No | Yes | Yes | Yes |
Geospatial indexing support | Yes | No | Yes | No | No |
B-tree indexes | Yes | Yes | Yes | No | No |
T-tree indexes | No | No | No | No | Yes |
Hash indexes | No | Yes | No | No | Yes |
Full-text search indexes | Yes | No | Yes | No | No |
Clustered indexes | No | No | Yes | No | No |
Data caches | No | N/A | Yes | No | Yes |
Index caches | Yes | N/A | Yes | No | Yes |
Compressed data | Yes | No | Yes | Yes | No |
Encrypted data | Yes | Yes | Yes | Yes | Yes |
Cluster database support | No | No | No | No | Yes |
Replication support | Yes | Yes | Yes | Yes | Yes |
Foreign key support | No | No | Yes | No | No |
Backup / point-in-time recovery | Yes | Yes | Yes | Yes | Yes |
Query cache support | Yes | Yes | Yes | Yes | Yes |
Update statistics for data dictionary | Yes | Yes | Yes | Yes | Yes |
InnoDB support for geospatial indexing is available in MySQL 5.7.5 and higher. InnoDB utilizes hash indexes internally for its Adaptive Hash Index feature. InnoDB support for FULLTEXT indexes is available in MySQL 5.6.4 and higher. Compressed MyISAM tables are supported only when using the compressed row format. Tables using the compressed row format with MyISAM are read only. Compressed InnoDB tables require the InnoDB Barracuda file format. Implemented in the server (via encryption functions), rather than in the storage engine. Implemented in the server, rather than in the storage engine. Implemented in the server, rather than in the storage engine. |
参考资料:
转载地址:http://xdzoa.baihongyu.com/