当前位置:网站首页>Bufferpool caching mechanism for executing SQL in MySQL
Bufferpool caching mechanism for executing SQL in MySQL
2022-07-03 22:41:00 【it00zyq】
One 、MySQL Bottom structure diagram

Two 、MySQL Logging and caching mechanism
After watching MySQL The underlying structure diagram of , Many people may have such questions : Why? MySQL You can't directly update the data on the disk, and set up such a complex mechanism to execute SQL Well ?
Because if every request is directly to MySQL Read and write data files , It's random IO, For each read and write , All mechanical hard disks have seek time and rotation delay , Therefore, the performance of directly updating data disk files is relatively low , For SSDs , You also need to determine the read and write location through the address translation mechanism , Therefore, directly updating disk files cannot make the database resist high concurrency .
MySQL This mechanism looks complex , But it can ensure that every update request is to update memoryBufferPool, Then write log files sequentially , At the same time, it can also ensure the data consistency under various abnormal conditions . The performance of updating memory and writing log files on disk sequentially is very high , Much higher than random reading and writing disk files .
binlog: It belongs to MySQL Server Layer log file , It is mainly used to recover database data .undo log:InnoDB Engine specific log files , It is mainly used to recover when a transaction is rolled back Buffer Pool Data in cache pool .redo log:InnoDB Engine specific log files , It is mainly used to recover after system downtime and restart Buffer Pool Data that has not been written to the disk in the cache pool .
边栏推荐
- Learning notes of raspberry pie 4B - IO communication (SPI)
- Buuctf, misc: n solutions
- 4 environment construction -standalone ha
- Harbor integrated LDAP authentication
- Data consistency between redis and database
- Covariance
- [untitled]
- pycuda._ driver. LogicError: explicit_ context_ dependent failed: invalid device context - no currently
- Esp-idf turns off serial port log output.
- BUUCTF,Misc:LSB
猜你喜欢

2022 safety officer-b certificate examination summary and safety officer-b certificate simulation test questions
![[actual combat record] record the whole process of the server being attacked (redis vulnerability)](/img/9c/34b916aca2f9270ec4cf4651f0de7e.jpg)
[actual combat record] record the whole process of the server being attacked (redis vulnerability)

What indicators should be paid attention to in current limit monitoring?

Programming language (1)

Es6~es12 knowledge sorting and summary

Exness: the Central Bank of England will raise interest rates again in March, and inflation is coming

QGIS grid processing DEM data reclassification

To rotate 90 degrees clockwise and modify the video format
![Buuctf, web:[geek challenge 2019] buyflag](/img/02/d3add04f8145621bff35d46b82ba53.jpg)
Buuctf, web:[geek challenge 2019] buyflag

IO flow review
随机推荐
2 spark environment setup local
Exclusive download! Alibaba cloud native brings 10 + technical experts to bring "new possibilities of cloud native and cloud future"
Blue Bridge Cup Guoxin Changtian single chip microcomputer -- software environment (II)
webAssembly
QGIS grid processing DEM data reclassification
2022 G3 boiler water treatment registration examination and G3 boiler water treatment examination papers
[automation operation and maintenance novice village] flask-2 certification
Programming language (1)
SDMU OJ#P19. Stock trading
Yyds dry goods inventory hands-on teach you to create a jigsaw puzzle using the canvasapi
Mysql database - Advanced SQL statement (I)
Exness: the Central Bank of England will raise interest rates again in March, and inflation is coming
Bluebridge cup Guoxin Changtian single chip microcomputer -- detailed explanation of schematic diagram (IV)
What indicators should be paid attention to in current limit monitoring?
The overseas listing of Shangmei group received feedback, and brands such as Han Shu and Yiye have been notified for many times and received attention
Blue Bridge Cup Guoxin Changtian single chip microcomputer -- led lamp module (V)
Leetcode week 4: maximum sum of arrays (shape pressing DP bit operation)
Some 5000+ likes, the development notes of a director of cosmic factory, leaked
How can enterprises and developers take advantage of the explosion of cloud native landing?
BUUCTF,Misc:LSB