当前位置:网站首页>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这边由连接器负责关闭这个连接,回收这个连接的资源。
边栏推荐
- Ant manor safety helmet 7.8 ant manor answer
- BindingException 异常(报错)处理
- Overview of FlexRay communication protocol
- How can I check the DOI number of a foreign document?
- MATLAB小技巧(30)非线性拟合 lsqcurefit
- Redis (I) -- getting to know redis for the first time
- [solution] final app status- undefined, exitcode- 16
- Go straight to the 2022ecdc fluorite cloud Developer Conference: work with thousands of industries to accelerate intelligent upgrading
- 肿瘤免疫治疗研究丨ProSci LAG3抗体解决方案
- Common problems of caching in high concurrency scenarios
猜你喜欢
随机推荐
Jetpack Compose 远不止是一个UI框架这么简单~
How to install swoole under window
使用TCP/IP四层模型进行网络传输的基本流程
dolphinscheduler3. X local startup
What are the classic database questions in the interview?
How to use wechat cloud hosting or cloud functions for cloud development of unapp development applet
大促过后,销量与流量兼具,是否真的高枕无忧?
Apache ab 压力测试
C interview encryption program: input plaintext by keyboard, convert it into ciphertext through encryption program and output it to the screen.
数据资产管理与数据安全国内外最新趋势
怎样查找某个外文期刊的文献?
Redis (II) - redis General Command
Installing redis and windows extension method under win system
2018年江苏省职业院校技能大赛高职组“信息安全管理与评估”赛项任务书第一阶段答案
【解决】Final app status- UNDEFINED, exitCode- 16
7天零基础能考证HCIA吗?华为认证系统学习路线分享
Overview of FlexRay communication protocol
Leetcode T1165: 日志分析
Stack and queue-p79-9
化工园区危化品企业安全风险智能化管控平台建设四大目标