当前位置:网站首页>struct MySQL
struct MySQL
2022-07-05 12:16:00 【The king of early rising】
First, start with the structure , Then analyze the execution process in terms of query and update operations
MySQL Structure
MySQL Its structure is divided into two layers :
Sever Layers and storage engines . This paper aims at InnoDB Engine to analyze .
Sever layer
The connector
The function of the connector is to detect login .
Check the account and password , Then check the permissions of the user . As the authority basis for all subsequent operations of the user .
Be careful : After modifying the permission of a user , You need to reconnect to take effect . Such as continuous disconnection , Permissions are still old .
The query cache
stay MySQL8.0 Remove later .
Follow cpu Caching is similar , When executing a statement , First, look in the cache , If you find it , Just operate in the cache , Synchronize updates to the database . Changes to the database will also be updated in the cache , To ensure consistency .
Why not , Because in practice ,MySQL Cache invalidation is very frequent . Later, it was no longer used .
analyzer
The analyzer has two steps , To check whether the statement is reasonable , And what the sentence does .
- Lexical check . This step will check the keywords in the statement , Include table name 、 Name 、select、 Query conditions, etc .
- Syntax check . Check whether the sentence conforms to the grammar .
Optimizer
The optimizer is to make MySQL Execute in the best way he thinks . For example, how to select indexes when there are multiple indexes , How to select Association order when querying multiple tables .
After the optimizer , One SQL How to execute the statement , It's all set .
actuator
First step : Verify user rights , That is, the user permissions queried by the connector are used .
If not, an error message will be returned , If permission permits , Then call the interface of the engine , Returns the result of the interface execution .
Keep early hours , take care . The king of early rising wishes you good luck !
边栏推荐
- JS for循环 循环次数异常
- [deploy pytoch project through onnx using tensorrt]
- 1. Laravel creation project of PHP
- POJ-2499 Binary Tree
- MySQL regular expression
- Course design of compilation principle --- formula calculator (a simple calculator with interface developed based on QT)
- [HDU 2096] 小明A+B
- Hash tag usage in redis cluster
- 一类恒等式的应用(范德蒙德卷积与超几何函数)
- Time tools
猜你喜欢
Pytorch weight decay and dropout
Riddle 1
Codeworks 5 questions per day (1700 average) - day 5
Yolov 5 Target Detection Neural Network - Loss Function Calculation Principle
MySQL storage engine
abap查表程序
[mainstream nivida graphics card deep learning / reinforcement learning /ai computing power summary]
Redis cluster (master-slave) brain crack and solution
查看rancher中debug端口信息,并做IDEA Remote Jvm Debug
Master the new features of fluent 2.10
随机推荐
MySQL transaction
Check the debug port information in rancher and do idea remote JVM debug
Redis cluster (master-slave) brain crack and solution
MySQL multi table operation
mysql拆分字符串做条件查询
【ijkplayer】when i compile file “compile-ffmpeg.sh“ ,it show error “No such file or directory“.
7月华清学习-1
Redis master-slave mode
强化学习-学习笔记3 | 策略学习
调查显示传统数据安全工具在60%情况下无法抵御勒索软件攻击
Matlab struct function (structure array)
1. Laravel creation project of PHP
跨平台(32bit和64bit)的 printf 格式符 %lld 输出64位的解决方式
How to clear floating?
What is digital existence? Digital transformation starts with digital existence
Pytorch MLP
一类恒等式的应用(范德蒙德卷积与超几何函数)
互联网公司实习岗位选择与简易版职业发展规划
Codeforces Round #804 (Div. 2)
One article tells the latest and complete learning materials of flutter