当前位置:网站首页>[Huang ah code] getting started with MySQL - 1. SQL execution process
[Huang ah code] getting started with MySQL - 1. SQL execution process
2022-07-18 18:52:00 【Hua Weiyun】
Hello everyone ! I'm yellow , In view of your enthusiasm for learning , From this day onwards , Will be serialized mysql Knowledge about , Those who need to learn can pay attention to my updated learning , It is estimated that the paid column will be opened later , But at present, it is completely possible to whore for nothing , I hope you cherish !
First let's look at a picture :

What we see MySQL It is composed of three layers , They are as follows :
adjoining course : Responsible for client and The server End establish connection , The client sends SQL To the server side , Simply put, interaction
SQL layer : Yes SQL Statement for query processing ;
Storage engine layer : And database Dealing with documents , Responsible for data storage and reading , There are disks 、 Memory and network .
Let's look at another picture , Here are SQL Statement execution flow :

In short, it's a word :SQL sentence → Cache query → Parser → Optimizer → actuator .
Cache query : The function is mysql8.0 Previous operations , Cache literally means to read the cache as soon as it is available , If you can't get it, please inquire , But now there are redis This kind of cache database , And the database is frequently written , It's a little chicken ribs for us , So from mysql8.0 after , The official has directly abandoned .
Parser : Equivalent to our English Translation , Specific have : Syntax analysis 、 Semantic analysis , After all, the machine doesn't understand what we write , They have to translate into something they understand .
Optimizer : Choose the best execution scheme , So as to improve the execution efficiency , Such as index .
actuator : It literally means to carry out what we have written sql sentence , Of course, the premise is that your current user has the permission to execute .
In terms of storage engine ,MySQL Has its own unique storage engine , common 、 Commonly used InnoDB and MyISAM, Let me list it in detail :
InnoDB Storage engine : It is MySQL 5.5 The default storage engine after version , The biggest feature of the transaction is that it supports 、 Row level locking 、 Foreign key constraints, etc .
MyISAM Storage engine : stay MySQL 5.5 Before version, it was the default storage engine , Unsupported transaction , Foreign keys are also not supported , The biggest characteristic is fast , Less occupied resources .
Memory Storage engine : Use system memory as storage medium , In order to get faster response speed . But if mysqld Process breakdown , Then all data will be lost , So we only use it when the data is temporary Memory Storage engine .
NDB Storage engine : It's also called NDB Cluster Storage engine , It is mainly used for MySQL Cluster Distributed cluster environment , Be similar to Oracle Of RAC colony
Archive Storage engine : It has a good compression mechanism , For filing , It is compressed when writing is requested , So it's often used as a warehouse .
MySQL What is more unique is that the storage engine is allocated according to the table , Not by Library , This is a relatively humanized point .
For small businesses ,1、2 Species are the most common , But if you want to enter a big factory , The latter three must also be understood and learned , Otherwise, you are still a little white .
Okay , That's all for today's lesson , Next time, we will continue , Coming soon .
I'm yellow , Code of codeword , refund ... refund ... refund ... the !
边栏推荐
猜你喜欢
![ERROR: Could not install packages due to an OSError: [ Errno 2] No such file or directory: ***](/img/81/6f9b7d554e6a47e614107c799229d2.png)
ERROR: Could not install packages due to an OSError: [ Errno 2] No such file or directory: ***
![Translation and interpretation of the paper: learning logic rules for reasoning on knowledge graphs [rnnlogic]](/img/71/5a80849f780414cd29135a25525281.png)
Translation and interpretation of the paper: learning logic rules for reasoning on knowledge graphs [rnnlogic]

文件的使用详解

CAN光端机解决泰和安TX3016C消防主机长距离联网问题

认识JVM

Tupu software builds a source network load storage system to build a circular economy version 2.0

双动点相对运动破解

A game research and development company in Shenzhen installed monitoring for each station. Netizen: it's comparable to imprisonment!

Custom type - structure

Solution of eigenvalue and eigenvector
随机推荐
Docker配置mysql以及宿主机容器目录挂载
Unity—常用API(续Time类)
【luogu P6891】ビルの飾り付け 4(DP)(结论)
Stream—优雅的处理集合元素
CAN光纤转换器解决泰和安TX3016A消防主机长距离联网问题
[LeetCode解题报告] 423. 从英文中重建数字
Software testing interview questions: briefly describe what is static testing, dynamic testing, black box testing, white box testing α Testing β Testing?
Flink1.7 from installation to experience
Preparing transaction:done Verifying transaction:failed RemoveError:‘requests‘ is a dependency of **
Typora changes marktext, and mark text downloads. Marktext calls up the toolbar and outline bar, sets the width of the text editing area, and edits shortcut keys.
2022新年祝福代码诠释(1)
Canal学习
thingJS的使用
Sweep redis distributed crawler deployment
在服务器上如何启动neo4j
mysql ibd文件反删除恢复之后异常处理----惜分飞
MySQL 变量、流程控制与游标练习
Translation and interpretation of the paper: learning logic rules for reasoning on knowledge graphs [rnnlogic]
11(1).C语言之结构体,如何定义结构体,获取结构体
TCP congestion control details | 6 Active queue management