MySQL存储引擎

  1. When use MyISAM?

MySQL有若干种存储引擎,默认的是 InnoDB[mysql]

InnoDB is the default and most general-purpose storage engine, and Oracle recommends using it for tables except for specialized use cases.

When use MyISAM?

These tables have a small footprint. Table-level locking limits the performance in read/write workloads, so it is often used in read-only or read-mostly workloads in Web and data warehousing configurations.

一般用于存储只读或者插入操作很少的表,如:配置表。知乎上,说 MyISAM 无法安全恢复有待考证。也说明 MyISAM 只适合于存储配置。

另外,数据量少的情况。其实使用和不使用 MyISAM 肯定是没有太多区别。如果从扩展性角度分析的话,也尽可能不选 MyISAM 。