一、存储引擎概述
1.1 什么是存储引擎
存储引擎是 MySQL 的核心组件,负责数据的存储和读取。MySQL 采用插件式的存储引擎架构,支持多种存储引擎。
-- 查看支持的存储引擎
SHOW ENGINES;
---------------------------------------------------------------------------------------------
| Engine | Support | Comment |
---------------------------------------------------------------------------------------------
| InnoDB | DEFAULT | Supports transactions, row-level locking, and foreign keys |
| MyISAM | YES | Non-transactional engine with good full-text search support |
| Memory | YES | Hash based, stored in memory, useful for temporary tables |
| CSV | YES | CSV storage engine |
| Archive | YES | Archive storage engine |
| Blackhole | YES | /dev/null storage engine |
| MRG_MYISAM | YES | Collection of identical MyISAM tables |
| FEDERATED | NO | Federated MySQL storage engine |
| PERFORMANCE_SCHEMA | YES | Performance Schema |
---------------------------------------------------------------------------------------------
-- 查看默认存储引擎
SHOW VARIABLES LIKE 'default_storage_engine';
-- 查看表的存储引擎
SHOW TABLE STATUS LIKE 'users'\G
2026/3/20大约 9 分钟