MySQL Concurrency: Locking and Transactions for MySQL Developers and Dbas

Krogh, Jesper Wisborg

  • 出版商: Apress
  • 出版日期: 2021-01-23
  • 售價: $2,090
  • 貴賓價: 9.5$1,986
  • 語言: 英文
  • 頁數: 376
  • 裝訂: Quality Paper - also called trade paper
  • ISBN: 148426651X
  • ISBN-13: 9781484266519
  • 相關分類: MySQLSQL
  • 立即出貨 (庫存=1)



Know how locks work in MySQL and how they relate to transactions. This book explains the major role that locks play in database systems, showing how locks are essential in allowing high-concurrency workloads. You will learn about lock access levels and lock granularities from the user level as well as table locks to record and gap locks. Most importantly, the book covers troubleshooting techniques when locking becomes a pain point.
Several of the lock types in MySQL have a duration of a transaction. For this reason, it is important to understand how transactions work. This book covers the basics of transactions as well as transaction isolation levels and how they affect locking. The book is meant to be your go-to resource for solving locking contention and similar problems in high-performance MySQL database applications.
Detecting locking issues when they occur is the first key to resolving such issues. MySQL Concurrency provides techniques for detecting locking issues such as contention. The book shows how to analyze locks that are causing contention to see why those locks are in place. A collection of six comprehensive case studies combine locking and transactional theory with realistic lock conflicts. The case studies walk you through the symptoms to look for in order to identify which issue you are facing, the cause of the conflict, its analysis, solution, and how to prevent the issue in the future.

What You Will Learn

  • Understand which lock types exist in MySQL and how they are used
  • Choose the best transaction isolation level for a given transaction
  • Detect and analyze lock contention when it occurs
  • Reduce locking issues in your applications
  • Resolve deadlocks between transactions
  • Resolve InnoDB record-level locking issues
  • Resolve issues from metadata and schema locks

Who This Book Is For
Database administrators and SQL developers who are familiar with MySQL and want to gain a better understanding of locking and transactions as well as how to work with them. While some experience with MySQL is required, no prior knowledge of locks and transactions is needed.




  • 了解MySQL中存在哪些鎖定類型以及它們的使用方式

  • 為給定的事務選擇最佳的事務隔離級別

  • 在發生鎖定競爭時檢測和分析

  • 減少應用程序中的鎖定問題

  • 解決事務之間的死鎖問題

  • 解決InnoDB記錄級別的鎖定問題

  • 解決元數據和模式鎖定引起的問題



Jesper Wisborg Krogh has worked with MySQL databases since 2006 both as a SQL developer and a database administrator, and for more than eight years as part of the Oracle MySQL Support team. He currently works as a database reliability engineer for Okta. He has spoken at MySQL Connect and Oracle OpenWorld on several occasions. In addition to his books, Jesper regularly blogs on MySQL topics and has authored approximately 800 documents in the Oracle Knowledge Base. He has contributed to the sys schema and four Oracle Certified Professional (OCP) exams for MySQL 5.6-8. Jesper holds a PhD in computational chemistry, lives in Sydney, Australia, and enjoys spending time outdoors walking, traveling, and reading. His areas of expertise include MySQL Cluster, MySQL Enterprise Backup (MEB), performance tuning, and the performance and sys schemas.


Jesper Wisborg Krogh自2006年起一直從事MySQL數據庫的工作,既是SQL開發人員,也是數據庫管理員,並且在Oracle MySQL支持團隊中擔任了八年以上的職位。他目前在Okta擔任數據庫可靠性工程師。他曾多次在MySQL Connect和Oracle OpenWorld上發表演講。除了他的書籍外,Jesper定期在MySQL主題上撰寫博客,並在Oracle知識庫中撰寫了大約800份文件。他為MySQL 5.6-8貢獻了sys模式和四個Oracle認證專業(OCP)考試。Jesper擁有計算化學博士學位,居住在澳大利亞悉尼,喜歡在戶外散步、旅行和閱讀。他的專業領域包括MySQL Cluster、MySQL Enterprise Backup(MEB)、性能調優以及性能和sys模式。