当前位置:网站首页>MySQL SQL的完整处理流程
MySQL SQL的完整处理流程
2022-07-07 02:39:00 【菜鸟~~】
mysql client和 mysql server进行通信的时候,如果走完所有的MySQL Server模块,需要依次经过连接器、解析器、优化器、执行器、存储引擎,如下图所示:
- 连接器:使用TCP加密的ssl通信协议,管理连接,控制最大连接量,检测连接时长,权限验证(账号密码等),优先查询缓存(两次同样的select之间有更新操作,查询缓存会清空)
- 解析器:和编译器的角色一样,要生成语法树,解析SQL词法以及语法分析
- 优化器:生成SQL的执行计划以及当前SQL相应的索引的选择(explain可查看)
- 执行器:调用存储引擎相应的API接口进行数据的读写操作
- 存储引擎:花费磁盘I/O读写磁盘数据,构建B+树索引,事务日志(undo log/redo log),锁机制,隔离级别…
class BaseEngine{
}
class MyISAM : public BaseEngine{
}
class InnoDB : public BaseEngine{
}
如果单纯的一次通信,客户端得到这一次通信的结果后会主动关闭连接,MySQL Server这边由连接器负责关闭这个连接,回收这个连接的资源。
边栏推荐
- Postgresql源码(59)分析事务ID分配、溢出判断方法
- 请问如何查一篇外文文献的DOI号?
- 数据资产管理与数据安全国内外最新趋势
- [opencv] morphological filtering (2): open operation, morphological gradient, top hat, black hat
- Tkinter window selects PCD file and displays point cloud (open3d)
- 途家、木鸟、美团……民宿暑期战事将起
- Stack and queue-p78-8 [2011 unified examination true question]
- [GNN] graphic gnn:a gender Introduction (including video)
- MySQL installation
- DB2获取表信息异常:Caused by: com.ibm.db2.jcc.am.SqlException: [jcc][t4][1065][12306][4.25.13]
猜你喜欢
随机推荐
DB2获取表信息异常:Caused by: com.ibm.db2.jcc.am.SqlException: [jcc][t4][1065][12306][4.25.13]
[solution] final app status- undefined, exitcode- 16
HKUST & MsrA new research: on image to image conversion, fine tuning is all you need
2022/07/04学习记录
一文带你了解静态路由的特点、目的及配置基本功能示例
ViewModelProvider.of 过时方法解决
一条慢SQL拖死整个系统
基于JS的迷宫小游戏
Postgresql源码(60)事务系统总结
How to use wechat cloud hosting or cloud functions for cloud development of unapp development applet
mobx 知识点集合案例(快速入门)
Navicat导入15G数据报错 【2013 - Lost connection to MySQL server during query】 【1153:Got a packet bigger】
请问如何查一篇外文文献的DOI号?
剑指offer-高质量的代码
拼多多败诉:“砍价免费拿”侵犯知情权但不构成欺诈,被判赔400元
肿瘤免疫治疗研究丨ProSci LAG3抗体解决方案
Stack and queue-p78-8 [2011 unified examination true question]
什么情况下考虑分库分表
[GNN] graphic gnn:a gender Introduction (including video)
Doctoral application | Professor Hong Liang, Academy of natural sciences, Shanghai Jiaotong University, enrolls doctoral students in deep learning








