当前位置:网站首页>存储引擎分析
存储引擎分析
2022-06-10 21:27:00 【InfoQ】
存储引擎


-- 查询建表语句
show create table account;
-- 建表时指定存储引擎
CREATE TABLE 表名(
...
) ENGINE=INNODB;
-- 查看当前数据库支持的存储引擎
show engines;
InnoDB
- DML 操作遵循 ACID 模型,支持事务
- 行级锁,提高并发访问性能
- 支持外键约束,保证数据的完整性和正确性
- xxx.ibd: xxx代表表名,InnoDB 引擎的每张表都会对应这样一个表空间文件,存储该表的表结构(frm、sdi)、数据和索引。
show variables like 'innodb_file_per_table';ibd2sdi xxx.ibd
MyISAM
- 不支持事务,不支持外键
- 支持表锁,不支持行锁
- 访问速度快
- xxx.sdi: 存储表结构信息
- xxx.MYD: 存储数据
- xxx.MYI: 存储索引
Memory
- 存放在内存中,速度快
- hash索引(默认)
- xxx.sdi: 存储表结构信息
存储引擎特点
存储引擎的选择
- InnoDB: 如果应用对事物的完整性有比较高的要求,在并发条件下要求数据的一致性,数据操作除了插入和查询之外,还包含很多的更新、删除操作,则 InnoDB 是比较合适的选择
- MyISAM: 如果应用是以读操作和插入操作为主,只有很少的更新和删除操作,并且对事务的完整性、并发性要求不高,那这个存储引擎是非常合适的。
- Memory: 将所有数据保存在内存中,访问速度快,通常用于临时表及缓存。Memory 的缺陷是对表的大小有限制,太大的表无法缓存在内存中,而且无法保障数据的安全性
边栏推荐
- Differences between disk serial number, disk ID and volume serial number
- leetcode 130. Surrounded Regions 被围绕的区域(中等)
- C use s7 Net connected to Siemens s1200plc, C # directly connected to Siemens PLC
- [tcapulusdb knowledge base] Introduction to tcapulusdb patrol inspection statistics
- 【TcaplusDB知识库】TcaplusDB引擎参数调整介绍
- 【TcaplusDB知识库】TcaplusDB机器初始化和上架介绍
- Model construction of mmdetection
- 笔记(五)- JVM
- GMPNN:Drug-drug interaction prediction with learnable size-adaptive molecular substructures.
- 数组 从指定长度位旋转数组
猜你喜欢

Sealem finance builds Web3 decentralized financial platform infrastructure

【TcaplusDB知识库】TcaplusDB TcapProxy扩缩容介绍
![[tcapulusdb knowledge base] tcapulusdb viewing process status introduction](/img/8d/fc454b23489edcd8a7528a0acd3a02.png)
[tcapulusdb knowledge base] tcapulusdb viewing process status introduction

C#使用S7.net连接西门子S1200PLC,C#直接连接西门子PLC

鲸会务为智能化防疫工作赋能

leetcode 130. Surrounded regions (medium)
![[tcapulusdb knowledge base] Introduction to tcapulusdb patrol inspection statistics](/img/67/e0112903cb3992a64bab02060dd59a.png)
[tcapulusdb knowledge base] Introduction to tcapulusdb patrol inspection statistics

C language - quick sorting in sorting

鲸会务会议分享:大会难办怎么办?

"The specified database user/password combination is rejected..." Solutions for
随机推荐
JVM runtime data area
按位操作符和移位操作符
【TcaplusDB知识库】TcaplusDB刷新tbus通道介绍
"The specified database user/password combination is rejected..." Solutions for
Array rotates the array from bits of the specified length
Solution to "XXX has broken path" error in idea
【TcaplusDB知识库】TcaplusDB TcapDB扩缩容介绍
Pytorch 安装超简单
记录(二)
Concept and use of CEPH distributed storage cluster pool resource pool
How to stimulate the vitality and driving force of cultural innovation
在D天内送达包裹的能力[抽象类二分--抽象判定方式]
自己做了个相亲交友App,有兴趣的朋友可以看看
Shell基础概念
数组 两个数组的交集 II
Visio 转为高质量PDF
Mmcv Config class introduction
[tcapulusdb knowledge base] Introduction to tcapulusdb patrol inspection statistics
Latex error: file ‘xxx. sty‘ not found
数组 加一