Tag

table lock

0 views collected around this technical thread.

Practical DevOps Architecture
Practical DevOps Architecture
May 29, 2025 · Databases

Quick Solutions for MySQL Table Locks

This guide outlines a step‑by‑step method to diagnose and release MySQL table locks by checking open tables, inspecting running processes, querying InnoDB transaction and lock tables, and generating KILL statements to terminate blocking sessions.

Database AdministrationMySQLSQL
0 likes · 3 min read
Quick Solutions for MySQL Table Locks
Aikesheng Open Source Community
Aikesheng Open Source Community
Aug 14, 2024 · Databases

Granting Table Locks and Row Locks in InnoDB

This article explains how InnoDB in MySQL 8.0.32 grants table and row locks, detailing the active versus passive acquisition, the lock‑granting algorithms for tables and rows, and the priority, weight, and FIFO rules that determine lock ordering and deadlock handling.

Database ConcurrencyInnoDBMySQL
0 likes · 11 min read
Granting Table Locks and Row Locks in InnoDB
Architect's Tech Stack
Architect's Tech Stack
May 17, 2024 · Databases

Understanding MySQL SELECT ... FOR UPDATE Locking: Row vs. Table Locks

This article explains how MySQL's SELECT ... FOR UPDATE statement acquires either row-level or table-level locks depending on the presence of indexes or primary keys, and demonstrates the behavior with multiple transaction examples and a sample table definition.

IndexesMySQLRow Lock
0 likes · 4 min read
Understanding MySQL SELECT ... FOR UPDATE Locking: Row vs. Table Locks
Aikesheng Open Source Community
Aikesheng Open Source Community
May 8, 2024 · Databases

When Can MySQL Locks Block Queries? A Deep Dive into Table‑Level and Metadata Locks

This article explains how MySQL table‑level locks and metadata locks (MDL) can block both reads and writes, describes the two lock implementations, their types, the interaction with LOCK TABLES and FLUSH TABLES, and provides practical queries for diagnosing lock‑related blocking issues.

LocksMySQLSQL
0 likes · 10 min read
When Can MySQL Locks Block Queries? A Deep Dive into Table‑Level and Metadata Locks
Laravel Tech Community
Laravel Tech Community
Jun 22, 2022 · Databases

Understanding MySQL SELECT ... FOR UPDATE: When It Locks Rows vs. Tables

This article explains how a plain SELECT does not lock data, while SELECT … FOR UPDATE adds a pessimistic lock whose scope—row or table—depends on whether the query uses an indexed or primary‑key column, and demonstrates the behavior with SQL examples and transaction scenarios.

MySQLRow LockSELECT FOR UPDATE
0 likes · 4 min read
Understanding MySQL SELECT ... FOR UPDATE: When It Locks Rows vs. Tables
Top Architect
Top Architect
Jun 22, 2022 · Databases

Understanding SELECT ... FOR UPDATE Locking in MySQL: Row vs. Table Locks

This article explains how the SELECT ... FOR UPDATE statement in MySQL adds a pessimistic lock, describes when it results in a row lock versus a table lock based on index usage, provides verification SQL, example scenarios, and practical tips for transaction handling.

DatabaseMySQLRow Lock
0 likes · 5 min read
Understanding SELECT ... FOR UPDATE Locking in MySQL: Row vs. Table Locks
Top Architect
Top Architect
Nov 3, 2021 · Databases

Understanding SELECT ... FOR UPDATE Locking in MySQL: Row vs. Table Locks

This article explains how MySQL's SELECT ... FOR UPDATE statement adds a pessimistic lock, detailing when it results in row-level locking versus table-level locking based on the presence of indexes or primary keys, and demonstrates the behavior with multiple practical examples.

DatabaseMySQLRow Lock
0 likes · 5 min read
Understanding SELECT ... FOR UPDATE Locking in MySQL: Row vs. Table Locks
Selected Java Interview Questions
Selected Java Interview Questions
Oct 22, 2021 · Databases

Understanding SELECT ... FOR UPDATE Locking in MySQL: Row vs. Table Locks

This article explains how MySQL's SELECT ... FOR UPDATE statement adds pessimistic locks, detailing when it results in row‑level locks versus table‑level locks based on the presence of indexes or primary keys, and provides verification examples with code and transaction scenarios.

MySQLRow LockSELECT FOR UPDATE
0 likes · 4 min read
Understanding SELECT ... FOR UPDATE Locking in MySQL: Row vs. Table Locks
Aikesheng Open Source Community
Aikesheng Open Source Community
Jun 8, 2021 · Databases

Understanding Table Locks in MySQL When Using INSERT INTO SELECT and the Impact of Isolation Levels

The article explains why an INSERT INTO SELECT statement can lock an entire InnoDB table in MySQL, demonstrates the lock behavior with transaction examples, and offers two solutions—adding an index on the filtered column and adjusting the transaction isolation level—to avoid table‑wide blocking.

INSERT SELECTInnoDBIsolation Level
0 likes · 13 min read
Understanding Table Locks in MySQL When Using INSERT INTO SELECT and the Impact of Isolation Levels
Architect's Tech Stack
Architect's Tech Stack
Aug 30, 2020 · Databases

Case Study of Insert‑Into‑Select Migration Causing Table Locks and Its Resolution

This article analyzes a real‑world incident where using INSERT INTO SELECT to migrate large order data caused full‑table scans and locking in MySQL, explains the underlying lock behavior, and presents a solution that adds an index and forces its use to avoid the problem.

INSERT INTO SELECTMySQLSQL
0 likes · 6 min read
Case Study of Insert‑Into‑Select Migration Causing Table Locks and Its Resolution
macrozheng
macrozheng
May 9, 2020 · Databases

Why Insert‑Into‑Select Can Lock Your MySQL Tables and How to Fix It

An engineer’s mishap with a massive ‘INSERT INTO … SELECT’ migration exposed how full‑table scans lock MySQL tables, causing payment failures, and shows that adding an index on the filter column prevents the lock and ensures safe, efficient data transfer.

INSERT INTO SELECTMySQLdatabase migration
0 likes · 7 min read
Why Insert‑Into‑Select Can Lock Your MySQL Tables and How to Fix It
Selected Java Interview Questions
Selected Java Interview Questions
Mar 16, 2020 · Databases

Understanding MySQL Table Locks, Row Locks, and Gap Locks

This article explains the differences between MySQL table locks and row locks, describes how MyISAM and InnoDB handle locking, provides explicit lock syntax with examples, discusses gap locks, and offers practical recommendations for avoiding lock contention in concurrent applications.

Gap LockInnoDBLocks
0 likes · 7 min read
Understanding MySQL Table Locks, Row Locks, and Gap Locks
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Sep 15, 2018 · Databases

Overview of MySQL Locks: Types, Characteristics, and Usage Scenarios

This article explains MySQL's lock mechanisms, covering table‑level, row‑level, and page locks, the differences between pessimistic and optimistic locking, shared locks, and provides guidance on when to choose table locks versus row locks in various application scenarios.

Database ConcurrencyLocksMySQL
0 likes · 7 min read
Overview of MySQL Locks: Types, Characteristics, and Usage Scenarios