当前位置:网站首页>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 .
边栏推荐
- 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
- What are the common computer problems and solutions
- [golang] leetcode intermediate - alphabetic combination of island number and phone number
- Redis single thread and multi thread
- The difference between SRAM and DRAM
- The latest analysis of crane driver (limited to bridge crane) in 2022 and the test questions and analysis of crane driver (limited to bridge crane)
- BUUCTF,Misc:LSB
- Recursion and recursion
- Development mode and Prospect of China's IT training industry strategic planning trend report Ⓣ 2022 ~ 2028
- Cesium terrain clipping draw polygon clipping
猜你喜欢
Mysql database - Advanced SQL statement (I)
Blue Bridge Cup -- guess age
pivot ROP Emporium
How can enterprises and developers take advantage of the explosion of cloud native landing?
IDENTITY
To rotate 90 degrees clockwise and modify the video format
Data consistency between redis and database
Exness: the Central Bank of England will raise interest rates again in March, and inflation is coming
What are the common computer problems and solutions
In 2022, 6G development has indeed warmed up
随机推荐
Quick one click batch adding video text watermark and modifying video size simple tutorial
How to solve the problem of requiring a password when accessing your network neighborhood on your computer
string
2022 high altitude installation, maintenance and removal of examination question bank and high altitude installation, maintenance and removal of examination papers
Unique in China! Alibaba cloud container service enters the Forrester leader quadrant
ThreadLocal function, scene and principle
2022 safety officer-b certificate examination summary and safety officer-b certificate simulation test questions
Druids connect to mysql8.0.11
Buuctf, misc: sniffed traffic
Rest reference
[Android reverse] application data directory (files data directory | lib application built-in so dynamic library directory | databases SQLite3 database directory | cache directory)
In 2022, 6G development has indeed warmed up
BUUCTF,Misc:LSB
股票炒股开户注册安全靠谱吗?有没有风险的?
LeetCode 1646. Get the maximum value in the generated array
Mysql database - Advanced SQL statement (I)
webAssembly
1 Introduction to spark Foundation
JS Demo calcule combien de jours il reste de l'année
2 spark environment setup local