In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces the relevant knowledge of what granularity locks are in mysql, the content is detailed and easy to understand, the operation is simple and fast, and has a certain reference value. I believe you will gain something after reading this mysql article about granularity locks. Let's take a look at it.
1. Table lock
A table lock means that the entire table is locked when locked. When the next transaction accesses the table, it must wait until the previous transaction is unlocked before accessing the table.
It is characterized by large granularity, simple locking and easy conflict.
2. Row lock
It means that when a table is locked, one or more rows of records are locked. When other transactions access the same table, only locked records cannot be accessed, and other records can be accessed normally.
It is characterized by small granularity, more troublesome lock than table lock, not easy to collision, and higher concurrency than table lock.
3. Record lock
Record lock is also a kind of lock, but the scope of record lock is only a record of a table, and a record lock is only a record of a table locked after a transaction lock.
4. Clearance lock
Gap lock is a kind of lock, which locks a certain interval of the table record after the transaction is locked. When there is a gap between the adjacent ID of the table, it forms a gap, which follows the principle of closing left and right.
5. Key lock
Key lock is also a kind of row lock, which is the default algorithm of INNODB row lock. In short, it records the combination of key and gap key, locks the record of query by temporary key, locks all gap spaces in the range query, and locks the next adjacent interval.
This is the end of the article on "what granularity locks are there in mysql". Thank you for reading! I believe you all have a certain understanding of the knowledge of "what granularity locks are in mysql". If you want to learn more, you are welcome to 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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.