当前位置:网站首页>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 .
边栏推荐
- Mongoose the table associated with the primary key, and automatically bring out the data of another table
- ThreadLocal function, scene and principle
- string
- Teach you to easily learn the type of data stored in the database (a must see for getting started with the database)
- Get current JVM data
- Es6~es12 knowledge sorting and summary
- 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
- The latest analysis of R1 quick opening pressure vessel operation in 2022 and the examination question bank of R1 quick opening pressure vessel operation
- Some 5000+ likes, the development notes of a director of cosmic factory, leaked
- [SRS] build a specified version of SRS
猜你喜欢
Firefox set up proxy server
1 Introduction to spark Foundation
[template summary] - binary search tree BST - Basics
Buuctf, web:[geek challenge 2019] buyflag
Wisdom tooth technology announced that it had completed the round D financing of US $100million and had not obtained a valid patent yet
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)
IO flow review
Redis single thread and multi thread
Meta metauniverse female safety problems occur frequently, how to solve the relevant problems in the metauniverse?
[SRS] build a specified version of SRS
随机推荐
Harbor integrated LDAP authentication
Morning flowers and evening flowers
How can enterprises and developers take advantage of the explosion of cloud native landing?
On my first day at work, this API timeout optimization put me down!
C3p0 connection MySQL 8.0.11 configuration problem
[sg function] lightoj Partitioning Game
Ppt image processing
Common problems in multi-threaded learning (I) ArrayList under high concurrency and weird hasmap under concurrency
2022 electrician (elementary) examination questions and electrician (elementary) registration examination
[flax high frequency question] leetcode 426 Convert binary search tree to sorted double linked list
Blue Bridge Cup -- guess age
Data consistency between redis and database
C deep anatomy - the concept of keywords and variables # dry inventory #
[template summary] - binary search tree BST - Basics
Sort merge sort
Runtime. getRuntime(). totalMemory/maxMemory()
Bluebridge cup Guoxin Changtian single chip microcomputer -- hardware environment (I)
Uboot migration
Blue Bridge Cup Guoxin Changtian single chip microcomputer -- software environment (II)
Cesium terrain clipping draw polygon clipping