Tag

database locks

1 views collected around this technical thread.

Cognitive Technology Team
Cognitive Technology Team
Jun 7, 2025 · Databases

Mastering MySQL Locks: Types, Mechanisms, and Best Practices

This article explains MySQL’s locking mechanisms, categorizing locks by performance, operation type, data granularity, and finer‑grained levels such as gap and next‑key locks, and offers guidance on selecting the appropriate lock strategy for reliable concurrent database operations.

InnoDBMySQLTransaction Isolation
0 likes · 9 min read
Mastering MySQL Locks: Types, Mechanisms, and Best Practices
Java Architect Essentials
Java Architect Essentials
May 16, 2024 · Databases

Lessons Learned: Risks of Using INSERT INTO SELECT for MySQL Data Migration

The article analyzes a real‑world MySQL data‑migration failure caused by an INSERT INTO SELECT operation that triggered full‑table scans and row‑level lock contention, leading to massive data loss and highlighting the need for proper indexing and cautious use of this command.

Full Table ScanINSERT INTO SELECTMySQL
0 likes · 7 min read
Lessons Learned: Risks of Using INSERT INTO SELECT for MySQL Data Migration
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Dec 25, 2023 · Backend Development

Why JVM Locks Can Deadlock with MySQL Row Locks—and How to Fix Them

This article explains how JVM synchronized locks and MySQL row locks can interact to cause deadlocks, demonstrates the problem with sample Spring code, shows the resulting lock‑wait timeout exception, and provides a refactoring solution to avoid the deadlock.

JVMJavaMySQL
0 likes · 8 min read
Why JVM Locks Can Deadlock with MySQL Row Locks—and How to Fix Them
Sanyou's Java Diary
Sanyou's Java Diary
Aug 21, 2023 · Databases

Master MySQL Optimization: Indexing, Locking, Pagination & Profiling Tips

This article presents practical MySQL optimization techniques—including proper index creation, avoiding index invalidation, choosing appropriate lock granularity, efficient pagination strategies, steering clear of SELECT *, and using EXPLAIN and SHOW PROFILE—to help developers write faster, more reliable SQL queries.

IndexingMySQLPerformance Tuning
0 likes · 10 min read
Master MySQL Optimization: Indexing, Locking, Pagination & Profiling Tips
Selected Java Interview Questions
Selected Java Interview Questions
May 29, 2021 · Databases

Understanding Database Locks: Shared, Exclusive, Mutex, Pessimistic, Optimistic, Row, Table, and Page Locks, and Common Concurrency Issues

This article explains the concepts, usage scenarios, and differences of various database locks—including shared (S) lock, exclusive (X) lock, mutex, pessimistic and optimistic locks—as well as row‑level, table‑level, and page‑level locks, and it discusses common concurrency problems such as lost updates, non‑repeatable reads, dirty reads, and deadlocks.

MySQLconcurrency controldatabase locks
0 likes · 8 min read
Understanding Database Locks: Shared, Exclusive, Mutex, Pessimistic, Optimistic, Row, Table, and Page Locks, and Common Concurrency Issues
Architecture Digest
Architecture Digest
Sep 5, 2020 · Databases

Understanding SQL Server Lock Escalation and How to Prevent It

This article explains the fundamentals of SQL Server locking, illustrates how row‑level locks can automatically escalate to table‑level locks during large batch operations, and provides practical techniques—such as batching deletes, adding appropriate indexes, and holding intent locks—to avoid lock escalation and improve concurrency.

Lock EscalationPerformance TuningSQL
0 likes · 12 min read
Understanding SQL Server Lock Escalation and How to Prevent It
Tencent Database Technology
Tencent Database Technology
Feb 26, 2020 · Databases

InnoDB Transaction Isolation Levels: Concepts, Implementation Details, and Practical Cases

This article explains the fundamentals of MySQL InnoDB transaction isolation levels, describes the four standard isolation grades, shows how InnoDB implements them in source code, and provides concrete case studies with SQL scripts to illustrate locking behavior and MVCC effects.

InnoDBMVCCMySQL
0 likes · 9 min read
InnoDB Transaction Isolation Levels: Concepts, Implementation Details, and Practical Cases
360 Quality & Efficiency
360 Quality & Efficiency
Jul 26, 2019 · Databases

Understanding Database Locks: Types, Commands, Analysis, and Optimization

This article explains the purpose and classification of database locks, demonstrates how to manually apply and inspect table and row locks in MySQL, analyzes lock‑related status variables, and offers practical optimization strategies to improve concurrency and performance.

MySQLOptimizationconcurrency
0 likes · 5 min read
Understanding Database Locks: Types, Commands, Analysis, and Optimization
Youzan Coder
Youzan Coder
Jan 25, 2019 · Databases

MySQL/InnoDB Deadlock Analysis: Detection, Handling, and Prevention

The guide explains MySQL/InnoDB deadlocks—how circular lock waits arise, the wait‑for‑graph detection that rolls back the transaction with fewer undo logs, the various lock modes and their behavior in UPDATE/INSERT/DELETE, and practical strategies such as proper indexing, consistent access order, and configuration tweaks to detect, handle, and prevent deadlocks.

Database OptimizationInnoDBInnoDB Lock Types
0 likes · 13 min read
MySQL/InnoDB Deadlock Analysis: Detection, Handling, and Prevention
Ctrip Technology
Ctrip Technology
Mar 14, 2018 · Databases

Understanding MySQL Metadata Locks and InnoDB Lock Mechanisms

This article explains MySQL's architecture, details the various metadata lock types, their acquisition and release processes, lock levels, and relationships, and then examines InnoDB's transaction isolation levels, lock types, lock levels, gap locks, and relevant source‑code structures.

InnoDBLock LevelsMySQL
0 likes · 15 min read
Understanding MySQL Metadata Locks and InnoDB Lock Mechanisms