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

Description and example usage of mysql Gap Lock

2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article mainly introduces "the explanation and example usage of mysql gap lock". In daily operation, I believe that many people have doubts about the explanation and example usage of mysql gap lock. The editor has consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "explanation and example usage of mysql gap lock". Next, please follow the editor to study!

1. When searching the scope, the entire range of data will be locked.

Even some data that does not exist in this range will be innocently locked. In some scenarios, it can have a great impact on performance.

2. If the execution condition is too large, InnoDB will lock all index key values in the entire range, which can easily affect performance.

Example

First change the value of field a to 1, 3, 5, 7, 9

Window A updates data in the range of a = 1x7

Update test_innodb_lock set bounded b5' where a > 1 and a

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

Development

Wechat

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

12
Report