Tagged articles

InnoDB

928 articles · Page 8 of 10
Programmer DD
Programmer DD
Apr 9, 2020 · Databases

How Many Rows Can a Single InnoDB B+ Tree Store? A Deep Dive

This article explains how InnoDB organizes data with B+ trees, calculates the maximum number of rows a single tree can hold (around 20 million), and shows how page size, pointer count, and tree height affect MySQL index performance.

B+ TreeDatabase IndexingInnoDB
0 likes · 11 min read
How Many Rows Can a Single InnoDB B+ Tree Store? A Deep Dive
MaGe Linux Operations
MaGe Linux Operations
Apr 7, 2020 · Databases

Understanding MySQL Locks: Types, Engines, and Deadlock Prevention

This article explains why MySQL requires locking, compares table and row lock types, details MyISAM and InnoDB lock mechanisms—including optimistic vs. pessimistic locks, lock algorithms, and deadlock handling—while providing practical SQL examples and prevention strategies.

Database LocksInnoDBMyISAM
0 likes · 16 min read
Understanding MySQL Locks: Types, Engines, and Deadlock Prevention
Architecture Digest
Architecture Digest
Mar 12, 2020 · Databases

Understanding MySQL Indexes: Types, Implementation, and Best Practices

This article explains what MySQL indexes are, the different categories such as ordinary, unique, composite, clustered and non‑clustered, how B‑Tree, B+Tree and hash indexes are implemented in InnoDB and MyISAM, and why auto‑increment primary keys are recommended for optimal performance.

B-TreeInnoDBMySQL
0 likes · 7 min read
Understanding MySQL Indexes: Types, Implementation, and Best Practices
Efficient Ops
Efficient Ops
Mar 5, 2020 · Databases

Inside MySQL InnoDB: Unveiling Architecture, Memory Structures, and Transaction Mechanics

This article provides a comprehensive overview of MySQL InnoDB's internal architecture, covering its memory and disk structures, buffer pool, change buffer, adaptive hash index, log buffer, various tablespace types, page layout, undo and redo logs, double‑write buffer, transaction isolation levels, and how the engine satisfies ACID properties.

ACIDBuffer PoolInnoDB
0 likes · 32 min read
Inside MySQL InnoDB: Unveiling Architecture, Memory Structures, and Transaction Mechanics
Aikesheng Open Source Community
Aikesheng Open Source Community
Mar 2, 2020 · Databases

Guide to Deploying and Managing MySQL InnoDB ReplicaSet with MySQL Shell and Router

This tutorial explains how to create and operate a MySQL InnoDB ReplicaSet—deploying sandbox instances, configuring a replica set with primary and secondary roles, adding nodes, performing manual primary switches and failure recovery, and using MySQL Router to provide an automatic read/write endpoint, while highlighting current limitations.

DatabaseReplicationGTIDInnoDB
0 likes · 8 min read
Guide to Deploying and Managing MySQL InnoDB ReplicaSet with MySQL Shell and Router
Java Backend Technology
Java Backend Technology
Feb 26, 2020 · Databases

How Does MySQL Lock Rows for DELETE? A Deep Dive into MVCC and Isolation Levels

This article explains how MySQL's InnoDB engine applies locks for DELETE and SELECT statements, covering MVCC, snapshot and current reads, clustered indexes, left‑most prefix rules, two‑phase locking, isolation levels, gap and next‑key locks, and analyzes nine different index‑and‑isolation scenarios with detailed conclusions.

InnoDBMVCCMySQL
0 likes · 16 min read
How Does MySQL Lock Rows for DELETE? A Deep Dive into MVCC and Isolation Levels
Qunar Tech Salon
Qunar Tech Salon
Feb 14, 2020 · Databases

Understanding InnoDB Rollback and UNDO Log Architecture in MySQL

This article explains the internal structure of InnoDB rollback segments, UNDO log storage formats, and the recovery process in MySQL, detailing how transaction IDs, segment headers, page headers, and log records are organized and used to safely roll back or purge data.

Database InternalsInnoDBMySQL
0 likes · 22 min read
Understanding InnoDB Rollback and UNDO Log Architecture in MySQL
Architecture Digest
Architecture Digest
Feb 13, 2020 · Databases

Understanding InnoDB Logical Storage Structure and MySQL Partitioning

This article explains the InnoDB logical storage architecture—including segments, extents, and pages—then introduces MySQL table partitioning concepts, details the main partition types (RANGE, LIST, HASH, KEY) with SQL examples, and discusses their performance implications for OLTP and OLAP workloads.

InnoDBMySQLPartitioning
0 likes · 8 min read
Understanding InnoDB Logical Storage Structure and MySQL Partitioning
Qunar Tech Salon
Qunar Tech Salon
Feb 13, 2020 · Databases

Understanding InnoDB REDO Log Recovery Process

This article explains how InnoDB uses REDO logs to recover a crashed MySQL database, detailing the steps of locating checkpoints, scanning log segments, parsing mini‑transactions, storing records in hash tables, and applying them to restore data consistency.

InnoDBMini-transactionMySQL
0 likes · 23 min read
Understanding InnoDB REDO Log Recovery Process
Qunar Tech Salon
Qunar Tech Salon
Feb 12, 2020 · Databases

Understanding MySQL REDO Log: Purpose, Types, and Flush Timing

This article explains the essential role of MySQL REDO logs in ensuring data durability and performance, describes what would happen without logging, details various REDO log record formats, and outlines the multiple moments when InnoDB flushes logs to disk.

InnoDBLog FlushingMySQL
0 likes · 18 min read
Understanding MySQL REDO Log: Purpose, Types, and Flush Timing
Qunar Tech Salon
Qunar Tech Salon
Feb 10, 2020 · Databases

InnoDB Buffer Pool Management Mechanism and Implementation Details

This article explains the theory behind InnoDB's log management, details the architecture and dynamic sizing of the Buffer Pool, describes its internal data structures and multi‑instance implementation, and provides annotated source code snippets to illustrate how MySQL allocates and manages buffer pages.

Buffer PoolDatabase InternalsInnoDB
0 likes · 15 min read
InnoDB Buffer Pool Management Mechanism and Implementation Details
Aikesheng Open Source Community
Aikesheng Open Source Community
Jan 14, 2020 · Databases

MySQL 8.0.19 Maintenance Release – New Features and Improvements

MySQL 8.0.19 introduces InnoDB ReplicaSet, Router enhancements, numerous SQL syntax additions, optimizer improvements, new Information Schema role views, security features, replication options, X Protocol compression, and a range of deprecations and bug fixes, providing a comprehensive update for database administrators and developers.

InnoDBMySQLReplication
0 likes · 12 min read
MySQL 8.0.19 Maintenance Release – New Features and Improvements
Programmer DD
Programmer DD
Dec 25, 2019 · Databases

How MySQL Locks DELETE Rows: MVCC, Isolation Levels, and Index Types Explained

This article analyzes how MySQL/InnoDB applies row-level locks for DELETE and SELECT statements under various index configurations and isolation levels, explaining MVCC, current vs. snapshot reads, two‑phase locking, gap and next‑key locks, and the impact of primary, unique, non‑unique, and missing indexes.

InnoDBMVCCMySQL
0 likes · 15 min read
How MySQL Locks DELETE Rows: MVCC, Isolation Levels, and Index Types Explained
Architecture Digest
Architecture Digest
Dec 6, 2019 · Databases

Understanding InnoDB Index Structures: B+ Trees, Covering Indexes, and Best Practices

This article explains how MySQL InnoDB implements indexes with B+ trees, describes primary and secondary (clustered and non‑clustered) indexes, the concepts of row lookup, covering indexes, composite indexes, the left‑most prefix rule, index push‑down, and provides practical guidelines for creating and maintaining efficient indexes.

B+ TreeInnoDBMySQL
0 likes · 10 min read
Understanding InnoDB Index Structures: B+ Trees, Covering Indexes, and Best Practices
Java Backend Technology
Java Backend Technology
Dec 1, 2019 · Databases

Why Large LIMIT Offsets Slow MySQL Queries and How to Fix Them

This article explains how using a large OFFSET in a MySQL LIMIT clause forces the server to scan hundreds of thousands of index and data pages, causing massive random I/O, and demonstrates a faster rewrite with an inner join that dramatically reduces buffer‑pool usage and execution time.

Buffer PoolInnoDBLIMIT
0 likes · 7 min read
Why Large LIMIT Offsets Slow MySQL Queries and How to Fix Them
Tencent Database Technology
Tencent Database Technology
Nov 28, 2019 · Databases

InnoDB Buffer Pool Architecture, Data Structures, and Page Lifecycle

This article provides a comprehensive overview of InnoDB's buffer pool, detailing its role as a data cache, the underlying data structures such as instances, chunks, and blocks, the page lifecycle from allocation to flushing, and discusses limitations of the default page‑cleaner implementation along with Percona's enhancements.

Database InternalsInnoDBPercona
0 likes · 16 min read
InnoDB Buffer Pool Architecture, Data Structures, and Page Lifecycle
Aikesheng Open Source Community
Aikesheng Open Source Community
Nov 14, 2019 · Databases

Understanding InnoDB Tablespace Space Management

This article explains how InnoDB stores user tables and indexes in .ibd files, describes the structure of tablespaces, pages, extents, header pages, XDES entries, INODE pages, and file segments, and shows how indexes allocate and free these internal structures as they grow and shrink.

Database InternalsInnoDBMySQL
0 likes · 10 min read
Understanding InnoDB Tablespace Space Management
Aikesheng Open Source Community
Aikesheng Open Source Community
Oct 14, 2019 · Databases

Analyzing MySQL InnoDB Thread Concurrency Issues and Their Resolution

This article examines a MySQL performance problem where frequent requests become unresponsive, analyzes processlist, system I/O/CPU metrics, and pstack traces to identify InnoDB thread concurrency and concurrency tickets as the root cause, then explains the relevant parameters, configuration guidelines, and a simulated test to demonstrate the solution.

InnoDBMySQLSQL
0 likes · 25 min read
Analyzing MySQL InnoDB Thread Concurrency Issues and Their Resolution
Aikesheng Open Source Community
Aikesheng Open Source Community
Oct 9, 2019 · Databases

Guide to MySQL InnoDB Tablespace Encryption: Overview, Configuration, Key Management, Import/Export, Backup and Restore

This article provides a comprehensive guide to MySQL InnoDB tablespace encryption, covering its architecture, supported plugins, configuration steps, key rotation, limitations, encrypted table operations, import/export procedures, and backup/restore methods using mysqlbackup and innobackupex.

InnoDBKey ManagementMySQL
0 likes · 17 min read
Guide to MySQL InnoDB Tablespace Encryption: Overview, Configuration, Key Management, Import/Export, Backup and Restore
Aikesheng Open Source Community
Aikesheng Open Source Community
Sep 7, 2019 · Databases

Weekly MySQL Community Digest: Industry Trends, Free Mycat Diagnosis, DBLE & DTLE Updates, and Original Technical Articles

This weekly MySQL community newsletter highlights September 2019 DB‑Engines rankings, offers free Mycat diagnosis, summarizes DBLE and DTLE development updates, and showcases original technical articles on WRITESET parallel replication, InnoDB primary‑key optimization, MySQL 8.0 error‑log enhancements, and query optimization, inviting community feedback.

DBLEDTLEInnoDB
0 likes · 5 min read
Weekly MySQL Community Digest: Industry Trends, Free Mycat Diagnosis, DBLE & DTLE Updates, and Original Technical Articles
Open Source Tech Hub
Open Source Tech Hub
Aug 27, 2019 · Databases

Unveiling MySQL InnoDB: From Instances to Page Storage Architecture

This article explains MySQL’s fundamental concepts, distinguishing databases from instances, outlines the three‑layer MySQL architecture, and dives deep into InnoDB’s storage hierarchy—from tablespaces, pages, and row formats to .frm/.ibd files, record overflow handling, and the B+‑tree index structures that power fast queries.

InnoDBMySQLdatabase architecture
0 likes · 11 min read
Unveiling MySQL InnoDB: From Instances to Page Storage Architecture
Big Data Technology Architecture
Big Data Technology Architecture
Aug 23, 2019 · Databases

How Many Rows Can an InnoDB B+ Tree Store? Explanation, Calculations, and Practical Verification

This article explains the storage capacity of InnoDB B+‑tree indexes by detailing page size, record size, pointer calculations, tree height effects, and real‑world verification using page‑level metadata, showing that a typical B+‑tree can hold tens of millions of rows with only 1‑3 I/O operations.

B+ TreeInnoDBMySQL
0 likes · 10 min read
How Many Rows Can an InnoDB B+ Tree Store? Explanation, Calculations, and Practical Verification
ITPUB
ITPUB
Aug 22, 2019 · Databases

How Many Rows Can a Single InnoDB B+ Tree Store? A Deep Dive

This article explains how InnoDB’s 16 KB pages, row size assumptions, and B+‑tree node capacities combine to allow roughly 20 million rows per tree, demonstrates how to calculate tree height from page metadata, and shows why MySQL chooses B+‑trees for primary‑key indexes.

B+ TreeInnoDBMySQL
0 likes · 11 min read
How Many Rows Can a Single InnoDB B+ Tree Store? A Deep Dive
Aikesheng Open Source Community
Aikesheng Open Source Community
Aug 10, 2019 · Databases

Weekly Community Digest: MySQL Rankings, Percona XtraBackup 8.0.7 Release, DBLE & DTLE Updates, and Technical Articles

This weekly digest highlights the August MySQL ranking surge, Percona XtraBackup 8.0.7 features, free Mycat diagnostic support, DBLE and DTLE weekly reports, and several in‑depth technical articles covering MySQL cloning, group replication, charset performance, ZooKeeper deployment, and InnoDB index construction.

DBLEDTLEInnoDB
0 likes · 5 min read
Weekly Community Digest: MySQL Rankings, Percona XtraBackup 8.0.7 Release, DBLE & DTLE Updates, and Technical Articles
Aikesheng Open Source Community
Aikesheng Open Source Community
Aug 9, 2019 · Databases

InnoDB Index Build Process and Fill Factor in MySQL 5.7+

Since MySQL 5.7 InnoDB builds secondary indexes using a bottom‑up, sorted‑index approach, the article explains the three build phases, presents a step‑by‑step B‑tree construction example with SQL code, and discusses the innodb_fill_factor setting, its impact, advantages, and drawbacks.

B+ TreeInnoDBMySQL
0 likes · 11 min read
InnoDB Index Build Process and Fill Factor in MySQL 5.7+
Aikesheng Open Source Community
Aikesheng Open Source Community
Aug 5, 2019 · Databases

Using MySQL 8.0.17 Clone Plugin to Create a Slave from Scratch

This article demonstrates how to install and verify the MySQL 8.0.17 clone plugin, create privileged clone users on both donor and recipient servers, configure cloning parameters, execute a full instance clone, set up replication with CHANGE MASTER, and discusses the plugin's limitations such as InnoDB‑only support and DDL restrictions.

Clone PluginInnoDBMySQL
0 likes · 10 min read
Using MySQL 8.0.17 Clone Plugin to Create a Slave from Scratch
Aikesheng Open Source Community
Aikesheng Open Source Community
Jul 30, 2019 · Databases

Using MySQL 8.0 CLONE Plugin to Create Instance Replicas

This article explains how the MySQL 8.0 CLONE plugin simplifies creating reliable replica instances by installing the plugin, granting necessary privileges, executing the CLONE SQL statement, monitoring progress via performance_schema, and verifying successful completion of all clone stages.

CloneDatabase ReplicationInnoDB
0 likes · 12 min read
Using MySQL 8.0 CLONE Plugin to Create Instance Replicas
JD Retail Technology
JD Retail Technology
Jul 12, 2019 · Databases

Understanding MySQL Lock Mechanisms, Transaction Isolation, and Concurrency Control

This article explains MySQL's lock types—including table and row locks, InnoDB's shared, exclusive, and intention locks—covers lock algorithms such as record, gap, next‑key, and insert‑intention locks, discusses deadlock and blocking issues, and details transaction management, isolation levels, and related configuration parameters.

ACIDInnoDBMySQL
0 likes · 39 min read
Understanding MySQL Lock Mechanisms, Transaction Isolation, and Concurrency Control
Java Captain
Java Captain
Jul 10, 2019 · Databases

Understanding Database Index Structures: From Binary Trees to B‑Tree and B+Tree

This article explains how library indexing inspires database indexing, introduces binary search trees, AVL trees, B‑Tree and B+Tree structures, and details InnoDB and MyISAM storage mechanisms, page organization, clustered versus non‑clustered indexes, and practical index‑optimization advice.

B+ TreeB-TreeData Structures
0 likes · 19 min read
Understanding Database Index Structures: From Binary Trees to B‑Tree and B+Tree
dbaplus Community
dbaplus Community
Jul 7, 2019 · Databases

Master MySQL Locking: Table vs Row Locks, InnoDB Algorithms & Transaction Isolation

This article explains MySQL's locking mechanisms, comparing table‑level and row‑level locks, detailing InnoDB lock types such as shared, exclusive and intention locks, describing lock algorithms like record, gap, next‑key and insert‑intention locks, and covering lock‑related issues, transaction isolation levels, autocommit behavior, and group commit optimization.

Group CommitInnoDBMySQL
0 likes · 43 min read
Master MySQL Locking: Table vs Row Locks, InnoDB Algorithms & Transaction Isolation
Tencent Database Technology
Tencent Database Technology
Jun 27, 2019 · Databases

Analysis and Optimization of InnoDB lock_wait_thread Contention in a Tencent Cloud Database

The article investigates intermittent slow update performance in a Tencent Cloud internal system caused by massive lock_wait_thread contention, analyzes the underlying InnoDB lock mechanisms and thread behavior, implements a fix by disabling lock_wait_suspend_thread triggers, and demonstrates substantial latency reduction through benchmark results.

InnoDBMySQLPerformance Optimization
0 likes · 8 min read
Analysis and Optimization of InnoDB lock_wait_thread Contention in a Tencent Cloud Database
Tencent Cloud Developer
Tencent Cloud Developer
Jun 3, 2019 · Databases

Storage Engine Overview and InnoDB Feature Design

An InnoDB storage engine sits above the file system and below SQL tools, providing transactions with redo/undo logs, row and table locking, MVCC, B+‑tree and adaptive hash indexes, compression, encryption, checkpointing, multi‑threaded buffering, backup and replication mechanisms, and extensive performance‑monitoring commands.

Database InternalsInnoDBMySQL
0 likes · 11 min read
Storage Engine Overview and InnoDB Feature Design
Efficient Ops
Efficient Ops
May 29, 2019 · Databases

Understanding MySQL Locks: From Table Locks to InnoDB Row Locks

This article explains MySQL's lock mechanisms, comparing MyISAM's table‑level locks with InnoDB's row‑level locks, covering lock types, compatibility, transaction isolation levels, deadlock scenarios, and practical tips to avoid lock contention and improve database concurrency.

Database ConcurrencyInnoDBLocks
0 likes · 22 min read
Understanding MySQL Locks: From Table Locks to InnoDB Row Locks
Youzan Coder
Youzan Coder
May 15, 2019 · Databases

Why a Simple SELECT LIMIT 1 Can Be Terribly Slow in MySQL InnoDB

A detailed investigation reveals that a seemingly trivial SELECT * FROM sbtest1 LIMIT 1 becomes slow due to InnoDB's MVCC visibility checks, a growing History List length, and a large number of deleted rows that must be scanned before a visible row is found.

InnoDBMVCCMySQL
0 likes · 12 min read
Why a Simple SELECT LIMIT 1 Can Be Terribly Slow in MySQL InnoDB
Aikesheng Open Source Community
Aikesheng Open Source Community
Apr 25, 2019 · Databases

Understanding XtraBackup Full Backup Process for MySQL

This article explains MySQL backup classifications, then details XtraBackup's hot physical backup workflow—including redo‑log handling, global read‑lock usage, step‑by‑step file copying, and restore procedures—while addressing common FAQs and practical tips for ensuring data consistency.

Full BackupInnoDBMySQL
0 likes · 6 min read
Understanding XtraBackup Full Backup Process for MySQL
ITPUB
ITPUB
Apr 23, 2019 · Databases

Understanding MySQL Locking Mechanisms: From Row Locks to Gap Locks

This article explains MySQL's three lock types, the storage engines that use them, detailed MyISAM and InnoDB lock behaviors, gap‑lock pitfalls, optimization tips, and how to monitor lock contention with built‑in status variables.

InnoDBMyISAMMySQL
0 likes · 10 min read
Understanding MySQL Locking Mechanisms: From Row Locks to Gap Locks
Java Captain
Java Captain
Apr 12, 2019 · Databases

Understanding MySQL Indexes in InnoDB: Structures, Types, and Optimization Techniques

This article explains MySQL indexes—defining what they are, classifying them by structure, storage, and logic, illustrating InnoDB clustered and secondary index structures with examples, and covering advanced concepts such as covering indexes, the leftmost‑prefix rule, and index condition pushdown to improve query performance.

Covering IndexDatabase IndexesInnoDB
0 likes · 10 min read
Understanding MySQL Indexes in InnoDB: Structures, Types, and Optimization Techniques
Youzan Coder
Youzan Coder
Apr 10, 2019 · Databases

Why Does MySQL Hold Locks Until Commit? A Deep Dive into InnoDB Locking

This article explains why MySQL acquires row locks that persist until a transaction commits, using analogies with multithreading, detailed transaction scenarios, the role of intention locks, and how isolation levels affect lock behavior, all illustrated with code examples and diagrams.

InnoDBIntention LockMySQL
0 likes · 7 min read
Why Does MySQL Hold Locks Until Commit? A Deep Dive into InnoDB Locking
Java Backend Technology
Java Backend Technology
Mar 21, 2019 · Databases

Why Does MySQL Skip Redundant UPDATEs in ROW Binlog Mode?

This article tests whether MySQL re‑executes an UPDATE that sets a row to its existing values, comparing the behavior under binlog_format=ROW with binlog_row_image=FULL versus binlog_format=STATEMENT, and explains why redundant updates are ignored in ROW mode.

BinlogInnoDBMySQL
0 likes · 3 min read
Why Does MySQL Skip Redundant UPDATEs in ROW Binlog Mode?
dbaplus Community
dbaplus Community
Mar 17, 2019 · Databases

Understanding InnoDB Locks: From Record Locks to Deadlocks

This article explains MySQL InnoDB’s transaction locking mechanisms—including shared, exclusive, intention, gap, and next‑key locks—covers lock compatibility, demonstrates lock behavior with practical examples, explores phantom reads, lost updates, optimistic vs. pessimistic locking, and analyzes common deadlock scenarios.

Gap LockInnoDBLocks
0 likes · 28 min read
Understanding InnoDB Locks: From Record Locks to Deadlocks
Tencent Database Technology
Tencent Database Technology
Mar 12, 2019 · Databases

Understanding MySQL 8.0 Data Dictionary, Atomic DDL, and Persistent Autoincrement

This article explains the evolution of MySQL's data dictionary from pre‑8.0 scattered metadata to the unified InnoDB dictionary tables in MySQL 8.0, covering storage structures, dictionary caching, information_schema changes, serialized dictionary information (SDI), atomic DDL mechanisms, persistent autoincrement handling, upgrade considerations, and provides practical code examples.

Atomic DDLInnoDBMySQL
0 likes · 22 min read
Understanding MySQL 8.0 Data Dictionary, Atomic DDL, and Persistent Autoincrement
Aikesheng Open Source Community
Aikesheng Open Source Community
Mar 11, 2019 · Databases

MySQL Parameter Optimization Using sysbench oltp_read_write Benchmark

This article details a step‑by‑step MySQL performance tuning process—starting from hardware and software environment description, through parameter‑level optimization of InnoDB buffer pool and redo logs, to additional tweaks—demonstrating up to three‑fold throughput improvements based on sysbench oltp_read_write testing.

InnoDBMySQLOptimization
0 likes · 6 min read
MySQL Parameter Optimization Using sysbench oltp_read_write Benchmark
Youzan Coder
Youzan Coder
Mar 8, 2019 · Databases

MySQL InnoDB Deadlock Case Study and Resolution

An InnoDB deadlock occurs when concurrent UPDATEs on a table with a composite (c,d) index generate conflicting GAP and Next‑Key locks during internal delete‑plus‑insert operations, and the simplest resolution is to drop column d from the index, leaving a single‑column index to prevent the lock clash.

InnoDBMySQLSQL
0 likes · 10 min read
MySQL InnoDB Deadlock Case Study and Resolution
Youzan Coder
Youzan Coder
Mar 1, 2019 · Databases

Why Do MySQL Inserts Cause Deadlocks? A Deep Dive into a Real-World Case

This article analyzes a MySQL deadlock scenario where concurrent inserts and unique‑key conflicts lead to circular lock waits, explains the underlying lock behavior, walks through the full deadlock log, and proposes using INSERT ON DUPLICATE KEY UPDATE to prevent the issue.

InnoDBMySQLdatabase
0 likes · 7 min read
Why Do MySQL Inserts Cause Deadlocks? A Deep Dive into a Real-World Case
Youzan Coder
Youzan Coder
Feb 22, 2019 · Databases

MySQL Deadlock Case Study and Analysis

The article examines a MySQL 5.6 deadlock caused by concurrent sessions locking a row via a non‑unique index and the primary key in different orders, explains the circular wait illustrated in the log, and recommends updating rows using the primary key to enforce consistent lock ordering and prevent such deadlocks.

InnoDBMySQLdeadlock
0 likes · 7 min read
MySQL Deadlock Case Study and Analysis
Youzan Coder
Youzan Coder
Feb 20, 2019 · Databases

MySQL REPLACE INTO Deadlock: Case Study and Analysis

The article analyzes how MySQL’s REPLACE INTO statement can cause deadlocks by acquiring exclusive GAP locks during duplicate‑key handling, illustrates the issue with a step‑by‑step case study of three concurrent transactions, and recommends using pre‑check SELECT‑INSERT or serializing the statements to avoid the problem.

InnoDBLockMySQL
0 likes · 11 min read
MySQL REPLACE INTO Deadlock: Case Study and Analysis
Youzan Coder
Youzan Coder
Feb 15, 2019 · Databases

Why Three Concurrent INSERTs Trigger a Deadlock in InnoDB?

This article walks through a step‑by‑step InnoDB deadlock case where three sessions inserting rows with the same unique key cause a lock‑compatibility conflict, explains the INSERT lock phases, shows the actual deadlock log, and reveals why the deadlock occurs.

InnoDBInsert Intention LockMySQL
0 likes · 14 min read
Why Three Concurrent INSERTs Trigger a Deadlock in InnoDB?
Youzan Coder
Youzan Coder
Jan 30, 2019 · Operations

Why Do MySQL RR Transactions Deadlock? A Deep Dive into Index Locking

This article examines two MySQL deadlock scenarios under REPEATABLE READ isolation—one with a non‑unique index and another with a unique index—by presenting table definitions, test data, raw deadlock logs, and step‑by‑step analysis of lock acquisition and waiting, ultimately offering practical recommendations to avoid such deadlocks.

InnoDBMySQLRR isolation
0 likes · 12 min read
Why Do MySQL RR Transactions Deadlock? A Deep Dive into Index Locking
Youzan Coder
Youzan Coder
Jan 25, 2019 · Databases

Analyzing MySQL Deadlock Logs: A Step-by-Step Guide

The guide walks through creating a sample InnoDB table, reproducing a delete‑vs‑insert deadlock, and dissecting the SHOW ENGINE INNODB STATUS output to explain lock modes such as X, S, GAP and INSERT‑INTENTION, showing how one transaction’s IX lock and another’s X lock on the same index create a classic deadlock and why understanding these modes is crucial for diagnosis.

InnoDBLock AnalysisMySQL
0 likes · 8 min read
Analyzing MySQL Deadlock Logs: A Step-by-Step Guide