当前位置:网站首页>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这边由连接器负责关闭这个连接,回收这个连接的资源。
边栏推荐
- MOS管参数μCox得到的一种方法
- Install mongodb database
- Redis (I) -- getting to know redis for the first time
- [shell] summary of common shell commands and test judgment statements
- A program lets you understand what static inner classes, local inner classes, and anonymous inner classes are
- mobx 知识点集合案例(快速入门)
- 一文带你了解静态路由的特点、目的及配置基本功能示例
- Programmers' daily | daily anecdotes
- C language interview to write a function to find the first occurrence of substring m in string n.
- How to install swoole under window
猜你喜欢

缓存在高并发场景下的常见问题

LM small programmable controller software (based on CoDeSys) Note 23: conversion of relative coordinates of servo motor operation (stepping motor) to absolute coordinates

Abnova 体外转录 mRNA工作流程和加帽方法介绍

Doctoral application | Professor Hong Liang, Academy of natural sciences, Shanghai Jiaotong University, enrolls doctoral students in deep learning

Common problems of caching in high concurrency scenarios

ICML 2022 | explore the best architecture and training method of language model

拼多多败诉:“砍价免费拿”侵犯知情权但不构成欺诈,被判赔400元

RuntimeError: CUDA error: CUBLAS_STATUS_ALLOC_FAILED when calling `cublasCreate(handle)`问题解决

Handling hardfault in RT thread

2022年全国所有A级景区数据(13604条)
随机推荐
ICML 2022 | 探索语言模型的最佳架构和训练方法
How to use wechat cloud hosting or cloud functions for cloud development of unapp development applet
Abnova 膜蛋白脂蛋白体技术及类别展示
MYSQL----导入导出&视图&索引&执行计划
MATLAB小技巧(29)多项式拟合 plotfit
SVN version management in use replacement release and connection reset
学术报告系列(六) - Autonomous Driving on the journey to full autonomy
途家、木鸟、美团……民宿暑期战事将起
FPGA课程:JESD204B的应用场景(干货分享)
Tkinter window selects PCD file and displays point cloud (open3d)
Abnova循环肿瘤DNA丨全血分离,基因组DNA萃取分析
C interview 24 (pointer) define a double array with 20 elements a
企業如何進行數據治理?分享數據治理4個方面的經驗總結
Basic DOS commands
Navicat导入15G数据报错 【2013 - Lost connection to MySQL server during query】 【1153:Got a packet bigger】
【解决】Final app status- UNDEFINED, exitCode- 16
请问如何查一篇外文文献的DOI号?
mysql查看bin log 并恢复数据
项目实战 五 拟合直线 获得中线
Pinduoduo lost the lawsuit: "bargain for free" infringed the right to know but did not constitute fraud, and was sentenced to pay 400 yuan