当前位置:网站首页>你了解MySQL的架构与引擎吗?
你了解MySQL的架构与引擎吗?
2022-07-15 12:49:00 【羡羡ˇ】
可能很多同学学习过MySQL数据库, 并能灵活的处理表与表的关系 , 但对于MySQL底层是如何实现处理它们的就不是很了解了, 接着我们来介绍, 先看下图

以上就是mysql的整体架构, 接着我们来介绍它们
连接层
主要负责与客户端的连接(JDBC等), 授权认证 ,相关的安全方案等
服务层
从上图可以看到, 服务层中包括SQL接口, 解析器, 查询优化器, 缓存等, 服务层主要处理SQl接口等, 所有跨引擎的功能也在此层实现 , 如存储过程,函数等 ,服务层会对我们的操作进行优化, 还会使用缓存等功能
引擎层
这一层是存储引擎, 存储引擎真正负责对mysql数据的存储和提取, 不同的存储引擎的功能不同, 使用不同存储引擎的表结构也不同
物理文件存储层
存储数据, 与执行引擎交互, 还有一些文件与日志功能等
Mysql存储引擎
mysql运行不同的技术和功能来存储数据 , 这些存储的技术和功能就是存储引擎 , 存储引擎主要有: 1. MyIsam , 2. InnoDB, 3. Memory, 4. Blackhole, 5. CSV, 6. Performance_Schema, 7. Archive, 8. Federated , 9 Mrg_Myisam
这里我们重点谈论以下两个存储引擎 : InnoDB , MyIsam

以上是几种存储引擎的特性对比
InnoDB
InnoDB也是mysql默认的存储引擎 , 支持事务, ,有行级锁和外键约束,支持全文检索(全文索引),它的设计目标是处理大容量数据库系统,MySQL 运行时 Innodb 会在内存中建立缓冲池,用于缓冲数据和索引;支持主键自增.不存储表的总行数
InnoDB适合数据的写操作
MYISAM
Myisam不支持事务, 也不支持行级锁和外键, 写数据时需要锁定整张表 , 所以效率便第一点, 支持全文索引, 支持存储表的总行数
MYISAM适合数据的读操作

边栏推荐
- win11虚拟机里面mysql的ibd文件在哪里
- Change buffer introduction
- 曾经,我对着AI客服喷了两分钟,它只回复了我的第一句话
- UNP学习笔记-第二章传输层
- [200 opencv routines] 230 LBP statistical histogram of feature description
- Shangyun boutique | cloud store helps Huike promote the combination of schools and enterprises and jointly cultivate talents
- ArkUI常见问题汇总【系列1】
- UTONMOS:社交元宇宙如何构建数字世界
- 【开发教程17】AI语音人脸识别(会议记录仪/人脸打卡机)-AI人脸注册认证与识别
- leetcode 605. Can place flowers planting problem (simple)
猜你喜欢

How does Xishanju build a game industry assembly line with ones? | Ones industry practice

MySQL (III) router, MHA high availability

Gates donated another $20billion, Google cloud switched to arm, and twitter employees were warned by CEO musk. Today, more big news is here

PD-Server GRPC 接口图解

Award winning research | openeuler developer experience research questionnaire

AI briefing - model integration Sam and SWA

曾经,我对着AI客服喷了两分钟,它只回复了我的第一句话

Devkit - mpc5744p configuration RTOS

Mise en œuvre du modèle proxy actif zabbix

让企业数字化砸锅和IT主管背锅的软件供应链安全风险指北
随机推荐
Euler talk | developer community experience bureau starts at about 19:30 on July 14
想找个大券商开户?现在通过手机股票开户是安全的吗?
难道双非本科就一定进不了大厂?阿里技术四面+交叉面+HR面,成功拿到offer!!
Index in MySQL
中國人力資源數字化生態圖譜-靈活用工市場
上云精品 | 云商店助力慧科 推动校企联合,共育人才发展
leetcode 605. Can Place Flowers 种花问题 (简单)
Change Buffer介绍
Online office, how to make collaboration more efficient?
JS to realize the function of electronic signature
Equal subtrees on binary trees
Andorid studio makes happy writing numbers (timer start + frame animation)
Chromium Threading and Task
Utonmos: how social metauniverse constructs digital world
“小白嘴”白山药是哪个县的特色农产品? 蚂蚁新村7月15日答案
5 款内部系统搭建低代码平台评测
The colleague next to me was suddenly promoted to meituan P7 because he secretly learned this JVM note?
Chromium Threading and Task
Want to be an elite developer? Please force yourself to form these 10 habits
Talk about seven ways to realize asynchronous programming