1. Storage Engine In the last section, we mentioned that the SQL execution plan is completed by the executor component calling the storage engine interface. So what storage engines does MySQL have? The main ones are MyISAM, InnoDB, Memory and so on. Now, the InnoDB storage engine is basically used on the Internet, so next I will briefly summarize my learning about the InnoDB storage engine and briefly introduce the components in the InnoDB storage engine. Buffer Pool We all know now that database data is stored in disk files. Answer: No! Because the random reading and writing performance of disk files is very poor, if all operations are performed on the disk, there will be no such thing as high-performance MySQL, MySQL will not be able to support high concurrency, and it will not be so popular on the Internet. At this time, the most important component of the InnoDB storage engine is The usage principle of the buffer pool: Let's first review the process of MySQL receiving requests. ①. The MySQL worker thread specifically monitors the connection of the database connection pool, and obtains the SQL statement in the connection if there is a connection. The above is a summary of the previous article. So how does the storage engine interface perform additions, deletions, modifications, and queries? Take the update operation as an example, and the others are similar. 3. Undo log files We all know that in a transaction, data updates can be rolled back at any time before the transaction is committed. So what do you rely on to do this? Relying on The usage principle of undo log file: Take updating data as an example: 4. redo log buffer As mentioned above, all add, delete, modify and query operations are actually performed in the buffer pool, so the changes to the data are not immediately implemented in the disk files. So here comes a question: What if MySQL crashes before the dirty data in the buffer pool is flushed back to the disk file? The usage principle of redo log buffer: Taking the update operation above as an example, when the data is updated, the key information of the data update will be recorded, which corresponds to the redo log and then written to But there is still a problem. As mentioned above, Therefore, Summarize The above is the summary of MySQL learning that the editor introduced to you, a preliminary understanding of the architectural design of the InnoDB storage engine. I hope it will be helpful to you! You may also be interested in:
|
>>: How to package the uniapp project as a desktop application
Table of contents 1. Job Execution Fault Toleranc...
The sudo command allows a trusted user to run a p...
introduction With the widespread popularity of In...
The following content introduces the process and ...
Check what is installed in mysql rpm -qa | grep -...
https base port 443. It is used for something cal...
Introduction to HTML HyperText Markup Language: H...
Copy code The code is as follows: @charset "...
Preface mysqlslap is a diagnostic program designe...
This article tests the environment: CentOS 7 64-b...
Table of contents ReactHooks Preface WhyHooks? Fo...
Table of contents Preface Static scope vs. dynami...
Preface <br />I have been working in the fro...
Here we introduce the centos server with docker i...
As of now, the latest version of CentOS is CentOS...