Skip to content

Stay curious. Build better.

Appearance

Choose how BestHub looks on this device.

Changes apply immediately.

Search articles

Open Discover with these filters

Suggested searches

Latest articles

18 min read

Why Adding a Column to a Ten‑Million‑Row Table Is Harder Than the SQL Itself

Adding a column to a tens‑of‑millions‑row MySQL table may look trivial, but the real difficulty lies in the metadata‑lock timing and online traffic impact, requiring careful DDL type selection, pre‑flight checks, and often an online migration tool such as gh‑ost to avoid business‑level outages.

18 min read

Understanding MySQL Lock Mechanisms: Metadata Locks, InnoDB Locks, and Source Code Insights

This article provides a comprehensive overview of MySQL's lock architecture, covering the two‑layer server/storage engine design, metadata (MDL) locks, InnoDB row and gap locks, transaction isolation levels, and practical debugging techniques using source‑code entry points and real‑world examples.

25 min read

MySQL Metadata Lock (MDL): Usage, Implementation, Deadlock Detection, and Lock‑Free Optimizations

This article explains MySQL's Metadata Lock (MDL) subsystem, describing how MDL protects metadata, the lock types and modes, the transaction‑level implementation introduced in MySQL 5.5 and refined in 5.7, the lock acquisition and release algorithms, deadlock detection mechanisms, and the lock‑free hash table used to store lock objects.

17 min read

How MySQL 5.7 Optimizes Metadata Locks and Boosts Replication Performance

This article explains the evolution of MySQL's metadata lock (MDL) subsystem, the introduction of lock‑free hash tables and fast‑path locking in 5.7, the hash_scan replication optimization, TokuDB 7.5.0 enhancements, and MariaDB's small‑LIMIT filesort improvement, providing deep insight into modern database performance tuning.