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
Using CSS layout to create web pages that comply w...
Over the past few years, there has been a trend i...
1. Backup source list The default source of Ubunt...
Preface: For the implementation of digital additi...
Table of contents 1. Declare a function 2. Callin...
1 Introduction Good coding habits are qualities t...
This article example shares the specific code of ...
Let's take a look at the detailed method of b...
1. Introduction to Middleware 1. Basic concepts E...
1. Check the character set of MySQL show variable...
1. Background We do some internal training from t...
Through JavaScript, we can prevent hyperlinks fro...
This article uses an example to describe the simp...
1. Understanding of transition attributes 1. The ...
Table of contents 1. Array deconstruction 2. Obje...