首页 > 数据库技术 > 详细

MySQL存储引擎

时间:2020-10-12 20:09:14      阅读:32      评论:0      收藏:0      [点我收藏+]
MySQL存储引擎(MySQL的“文件系统”)

zabbix用到的是tokudb三方引擎!该引擎支持多次数据的插入,性能不错

innodb功能总览(重点功能关注!):事务/锁定粒度 行/备份与恢复/自动故障恢复(理论上不怕突然断电,宕机等)

存储引擎查询
select @@default_storage_engine; //查看默认存储引擎
show engines; //还可以看到存储引擎是否支持事务
show create table city; //查看city表存储引擎
show table status like ‘city‘\G
select table_schema,table_name,engine from information_schema.tables where table_schema=‘world‘;
select table_schema,table_name,engine from information_schema.tables where table_schema=‘mysql‘;
select table_schema,table_name,engine from information_schema.tables where engine=‘csv‘;

存储引擎设置
1、在启动配置文件中设置服务器存储引擎:
[mysqld]
default-storage-engine=<Storage Engine>
2、使用 SET 命令为当前客户机会话设置:(临时) //临时的,这种很少用到!
SET @@storage_engine=<Storage Engine>;
3、在 CREATE TABLE 语句指定: //建表的时候定义存储引擎,这是常用方法!
CREATE TABLE t (i INT) ENGINE = <Storage Engine>;

MySQL存储引擎

原文:https://blog.51cto.com/tangyong/2541417

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!