当前位置:网站首页>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 .
边栏推荐
- (POJ - 2912) rochambau (weighted concurrent search + enumeration)
- Some 5000+ likes, the development notes of a director of cosmic factory, leaked
- Niuke winter vacation training camp 4 g (enumeration optimization, Euler power reduction)
- Exness: the Central Bank of England will raise interest rates again in March, and inflation is coming
- [golang] leetcode intermediate - alphabetic combination of island number and phone number
- Mysql database - Advanced SQL statement (I)
- STM32 multi serial port implementation of printf -- Based on cubemx
- How to solve win10 black screen with only mouse arrow
- Mindmanager2022 serial number key decompression installer tutorial
- Subset enumeration method
猜你喜欢

Kali2021.4a build PWN environment

Redis single thread and multi thread

STM32 multi serial port implementation of printf -- Based on cubemx

Es6~es12 knowledge sorting and summary

webAssembly

The latest analysis of R1 quick opening pressure vessel operation in 2022 and the examination question bank of R1 quick opening pressure vessel operation

Covariance

Data consistency between redis and database

Bluebridge cup Guoxin Changtian single chip microcomputer -- detailed explanation of schematic diagram (IV)

Data consistency between redis and database
随机推荐
6.0 kernel driver character driver
Rest reference
Blue Bridge Cup -- guess age
The reason why the computer runs slowly and how to solve it
What are the common computer problems and solutions
4 environment construction -standalone ha
Pat grade A - 1164 good in C (20 points)
Recursion and recursion
Creation of the template of the password management software keepassdx
Data consistency between redis and database
Quick one click batch adding video text watermark and modifying video size simple tutorial
JS Demo calcule combien de jours il reste de l'année
QGIS grid processing DEM data reclassification
JS demo calculate how many days are left in this year
2 spark environment setup local
Exclusive download! Alibaba cloud native brings 10 + technical experts to bring "new possibilities of cloud native and cloud future"
How the computer flushes the local DNS cache
[dynamic programming] Ji Suan Ke: Suan tou Jun breaks through the barrier (variant of the longest increasing subsequence)
2022 electrician (elementary) examination questions and electrician (elementary) registration examination
Development mode and Prospect of China's IT training industry strategic planning trend report Ⓣ 2022 ~ 2028