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 are the uses of MVCC in MySQL

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly gives you a brief account of the usage of MVCC in MySQL. You can look up the relevant professional terms on the Internet or find some related books to supplement them. We will not dabble here, so let's go straight to the topic. I hope this article on the use of MVCC in MySQL can bring you some practical help.

MVCC (multi-version concurrency control)

Function: in many cases, locking operations can be avoided and overhead can be reduced.

MVCC under InnoDB

This is achieved by saving two hidden columns after each row record, the creation time of the row and the expiration time of the row (delete time). The time here refers to the system version number, which increases itself every time you start a new thing. The system version number at the beginning of the thing is used as the version number of the thing, which is used to compare with the version number of each row of records that are queried.

Specific operation of MVCC under REPEATABLE READ isolation level

SELECT

InnoDB only finds data rows whose version is earlier than the current transaction version (the system version number of the row

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: 216

*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

Database

Wechat

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

12
Report