当前位置:网站首页>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 .
边栏推荐
- How to solve the problem of computer networking but showing no Internet connection
- Is it safe and reliable to open an account and register for stock speculation? Is there any risk?
- Ppt image processing
- Simple solution of m3u8 file format
- pivot ROP Emporium
- Electronic tube: Literature Research on basic characteristics of 6j1
- Blue Bridge Cup Guoxin Changtian single chip microcomputer -- software environment (II)
- Data consistency between redis and database
- BUUCTF,Misc:LSB
- Blue Bridge Cup Guoxin Changtian MCU -- program download (III)
猜你喜欢
![[Android reverse] application data directory (files data directory | lib application built-in so dynamic library directory | databases SQLite3 database directory | cache directory)](/img/b8/e2a59772d009b6ee262fb4807f2cd2.jpg)
[Android reverse] application data directory (files data directory | lib application built-in so dynamic library directory | databases SQLite3 database directory | cache directory)

Es6~es12 knowledge sorting and summary

Blue Bridge Cup Guoxin Changtian single chip microcomputer -- software environment (II)

Covariance

Buuctf, misc: sniffed traffic

pivot ROP Emporium

1068. Consolidation of ring stones (ring, interval DP)

Firefox set up proxy server

6.0 kernel driver character driver

Yyds dry goods inventory Spring Festival "make" your own fireworks
随机推荐
Creation of the template of the password management software keepassdx
Ansible common usage scenarios
How can enterprises and developers take advantage of the explosion of cloud native landing?
Teach you how to run two or more MySQL databases at the same time in one system
Ppt image processing
Programming language (2)
Blue Bridge Cup -- Mason prime
Pooling idea: string constant pool, thread pool, database connection pool
540. Single element in ordered array
[untitled]
Text replacement demo
Pointer concept & character pointer & pointer array yyds dry inventory
[flax high frequency question] leetcode 426 Convert binary search tree to sorted double linked list
Cesium terrain clipping draw polygon clipping
Exclusive download! Alibaba cloud native brings 10 + technical experts to bring "new possibilities of cloud native and cloud future"
Sow of PMP
[Android reverse] application data directory (files data directory | lib application built-in so dynamic library directory | databases SQLite3 database directory | cache directory)
C deep anatomy - the concept of keywords and variables # dry inventory #
Pan Yueming helps Germany's Rochester Zodiac custom wristwatch
Data consistency between redis and database