当前位置:网站首页>MySQL的存储引擎
MySQL的存储引擎
2022-07-06 20:28:00 【火眼猊】
概念
数据库存储引擎是数据库底层软件组织,数据库管理系统(DBMS)使用数据引擎进行创建、查询、更新和删除数据。
- 不同的存储引擎提供不同的存储机制、索引技巧、锁定水平等功能。现在许多不同的数据库管理系统都支持多种不同的数据引擎。MySQL的核心就是存储引擎
- 用考可以根据不同的需求为数据表选择不同的存储引擎
- 可以使用SHOW ENGINES命令,可以查看MySQL的所有执行引擎,我们可以到默认的执行引擎是innoDB支持事务,行级锁定和外键。
分类
- CSV:逻辑上由逗号粉哥数据的存储引擎。特惠在数据库子目录里为每个数据表创建一个.csv文件。这是一种普通文本文件,每个数据行占用一个文本行。CSV存储引擎不支持索引。
- BlackHole:黑洞引擎,写入的任何数据都会消失,一般用于记录binlog做复制的中继
- ERFORMANCE_SCHEMA存储引擎:该引擎主要用于手机数据库服务器性能参数。
- Mrg_Myisam Merge存储引擎:是一组Mylsam的组合,也就是说,他将Myisam引擎的多个表聚合起来,但是他的内部没有数据,真正的数据依然是Myisam引擎的表中,但是可以直接进行查询、删除更新等操作。
功能 | MyISAM | MEMORY | InnoDB |
---|---|---|---|
存储限制 | 256TB | RAM | 64TB |
支持事务 | No | No | Yes |
支持全文索引 | Yes | No | No |
支持B树索引 | Yes | Yes | Yes |
支持哈希索引 | No | Yes | No |
支持集群索引 | No | No | Yes |
支持数据索引 | No | Yes | Yes |
支持数据压缩 | Yes | No | No |
空间支持率 | 低 | N/A | 高 |
支持外键 | No | No | Yes |
操作
查询当前数据库支持的存储引擎
方法:
SHOW ENGINES;
查看当前默认存储引擎.
方法:
SHOW VARIABLES LIKE '%storage_engine%';
查看某个表用了什么引擎(在现实结果里参数engine后面的就表示当前用的存储引擎)
方法:
SHOW CREATE TABLE table_name;
创建新表时指定存储引擎
方法:
CREATE TABLE(...) ENGINE = MYISAM;
修改数据库引擎
方法:
ALTER TABLE table_name ENGINE = MYISAM;
ALTER TABLE table_name ENGINE = InnoDB;
修改MySQL默认存储引擎
- 关闭MySQL服务
- 找到MySQL服务安装目录下的my.ini文件
- 找到default-storage-engine=INNODB改为目标引擎
- 启动MySQL服务
边栏推荐
- Sorting operation partition, argpartition, sort, argsort in numpy
- 如何替换模型的骨干网络(backbone)
- When you go to the toilet, you can clearly explain the three Scheduling Strategies of scheduled tasks
- 我的勇敢对线之路--详细阐述,浏览器输入URL发生了什么
- Principle of attention mechanism
- About Tolerance Intervals
- Depth analysis of compilation constants, classloader classes, and system class loaders
- Tencent cloud native database tdsql-c was selected into the cloud native product catalog of the Academy of communications and communications
- 注意力机制原理
- Lab1 configuration script
猜你喜欢
VHDL实现任意大小矩阵加法运算
亚像素级角点检测Opencv-cornerSubPix
枚举通用接口&枚举使用规范
Shangsilicon Valley JVM Chapter 1 class loading subsystem
Huawei and Xiaomi "copy each other"
leetcode
24. (ArcGIS API for JS) ArcGIS API for JS point modification point editing (sketchviewmodel)
1200.Minimum Absolute Difference
U.S. Air Force Research Laboratory, "exploring the vulnerability and robustness of deep learning systems", the latest 85 page technical report in 2022
Sub pixel corner detection opencv cornersubpix
随机推荐
20.(arcgis api for js篇)arcgis api for js面采集(SketchViewModel)
注意力机制原理
Flutter3.0, the applet is not only run across mobile applications
input_ delay
Do you know the five most prominent advantages of E-bidding?
从0开始创建小程序
Set static IP for raspberry pie
Matlab Error (Matrix dimensions must agree)
cocos3——8. Implementation Guide for beginners
Optimization of application startup speed
美国空军研究实验室《探索深度学习系统的脆弱性和稳健性》2022年最新85页技术报告
Significance and measures of source code confidentiality
【无标题】
25. (ArcGIS API for JS) ArcGIS API for JS line modification line editing (sketchviewmodel)
Numpy中排序操作partition,argpartition,sort,argsort
Experience design details
HDU ACM 4578 Transformation->段树-间隔的变化
20. (ArcGIS API for JS) ArcGIS API for JS surface collection (sketchviewmodel)
Tencent cloud native database tdsql-c was selected into the cloud native product catalog of the Academy of communications and communications
HDU 4337 King Arthur' S Knights it outputs a Hamiltonian circuit