MySQL存储引擎简介(针对表)
存储引擎的概念是MySQL的特点,而且是一种插入式的
存储引擎概念。这决定了MySQL数据库中的表可以用不同的
方式存储。用户可以根据自己的不同要求,选择不同的存储
方式、是否进行事务处理等。
MySQL提供了插件式( Pluggable)的存储引擎,存储
引擎是基于表的,同一个数据库,不同的表,存储引擎可以
不同。甚至同一个数据库表,在不同的场合可以应用不同的
存储引擎。
SHOW ENGINES ;可查看MySQL服务实例支持的存储
引擎
InnoDB :是一个行级锁支持事务和外键
MyISAM:表级锁 不支持事务和外键 ,查询效率好 一般一些mysql的授权表
memory: 使用存储在内存的内容来创建表,所有数据防砸内存而不是磁盘所以速度更快,适应
一些临时表(因为重启就没了)