Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the WAL mechanism in mysql?

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

Most people do not understand the knowledge points of this article "what is the WAL mechanism in mysql", so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "what is the WAL mechanism in mysql" article.

1. WAL pre-write log system. For the efficient logging algorithm in the database, for the non-memory database, the disk Icano operation is an important bottleneck of the database efficiency.

Under the same amount of data, when the database system using WAL log submits business, the disk writing operation is only about half of that of the traditional rolling log, which greatly improves the efficiency of database disk Imano operation, thus improving the performance of the database.

2. The reason for using WAL is that the writing operation of the disk is random io, which consumes performance.

So if each update operation is written to the log first, it becomes a sequential write operation, and the actual update operation is written asynchronously by the background thread according to the log. Therefore, for the client side, the delay is reduced. Also, because sequential writes are highly likely, the number of io generated will be greatly reduced. Therefore, the core of WAL is to turn random writing into sequential writing, reducing client latency and increasing throughput.

Three principles of WAL

After the log is written successfully, the transaction will not be lost, and the subsequent checkpoint mechanism will ensure the consistency between the disk physical file and the redolog.

Use redolog to record the changed data, that is, to record the changed transaction data value in redo

Use undolog to record pre-change data, that is, record pre-change transaction data values in undo for reading scrolls and other multiple versions of transactions.

The above is the content of this article on "what is the WAL mechanism in mysql". I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about the relevant knowledge, please follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report