1.存储引擎介绍

相当于Linux文件系统,组织存储表数据

2.存储引擎的种类

mysql> mysql> show engines;
+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
| Engine | Support | Comment | Transactions | XA | Savepoints |
+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
| CSV | YES | CSV storage engine | NO | NO | NO |
| MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO |
| MyISAM | YES | MyISAM storage engine | NO | NO | NO |
| BLACKHOLE | YES | /dev/null storage engine (anything you write to it disappears) | NO | NO | NO |
| PERFORMANCE_SCHEMA | YES | Performance Schema | NO | NO | NO |
| MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |
| ARCHIVE | YES | Archive storage engine | NO | NO | NO |
| InnoDB | DEFAULT | Supports transactions, row-level locking, and foreign keys | YES | YES | YES |
| FEDERATED | NO | Federated MySQL storage engine | NULL | NULL | NULL |
+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+

innoDB
MyISAM
CSV
Memory


其他存储引擎:
mariadb    : InnoDB,TokuDB,Myrocks
Percona    :xtradb,TokuDB,Myrocks

TokuDB,Myrocks:比较适合在写入操作较多的场景,数据量极大的场景。
原因: 插入性能很高,压缩比较高
适合监控类的业务。

3.InnoDB存储引擎的核心特性

===============================
面试题:
    1.InnoDB存储引擎的特性
    2.InnoDB与MyISAM的区别
===============================
#特性:
MVCC:多版本并发控制
聚簇索引    PK
事务:innoDB独有的
行级锁    而MyISAM只支持表锁
外键  FK
复制支持高级特性:GTID等高级特性
AHI自适应hash索引
支持热备    MyISAM只支持温备
ACSR(自动故障恢复)



12-17 21:41