Tagged articles
866 articles
Page 5 of 9
政采云技术
政采云技术
Apr 26, 2022 · Databases

Analysis of Lock Wait Timeout and Gap Locks in InnoDB

This article analyzes a MySQL InnoDB lock wait timeout error, explains how gap locks cause blocked inserts and phantom reads under repeatable‑read isolation, and offers optimization strategies such as primary‑key deletions, while concluding with a recruitment invitation for the Zero technology team.

Gap LockInnoDBdatabase
0 likes · 7 min read
Analysis of Lock Wait Timeout and Gap Locks in InnoDB
Top Architect
Top Architect
Apr 24, 2022 · Databases

Optimizing MySQL Batch Insert Performance: Determining the Ideal Batch Size

This article analyzes MySQL batch insertion performance, explains how row size, max_allowed_packet, buffer pool, transaction handling, and index design affect throughput, and presents empirical tests that suggest using roughly half of the max_allowed_packet size as the optimal batch size for large data loads.

InnoDBmax_allowed_packetmysql
0 likes · 16 min read
Optimizing MySQL Batch Insert Performance: Determining the Ideal Batch Size
Programmer DD
Programmer DD
Apr 14, 2022 · Databases

How to Speed Up MySQL LIMIT Pagination from 16 s to 0.3 s with Subquery Optimization

This article demonstrates how a MySQL pagination query on a 9.5‑million‑row table that originally took over 16 seconds can be accelerated to under 0.4 seconds by moving the LIMIT condition into a subquery that selects only primary‑key IDs and then joining to retrieve the remaining columns, with detailed code and experimental verification.

InnoDBLimit OptimizationSubquery
0 likes · 10 min read
How to Speed Up MySQL LIMIT Pagination from 16 s to 0.3 s with Subquery Optimization
Java Interview Crash Guide
Java Interview Crash Guide
Apr 1, 2022 · Databases

Why MySQL Uses B+ Trees Over B Trees: Deep Dive into Index Structures

Explore MySQL's comprehensive index guide, covering basic concepts, B‑tree and B+‑tree structures, storage engine differences, index types, optimization strategies, and practical tips for designing effective primary, secondary, and composite indexes to boost query performance and reduce I/O overhead.

B+TreeDatabase OptimizationInnoDB
0 likes · 35 min read
Why MySQL Uses B+ Trees Over B Trees: Deep Dive into Index Structures
Architect's Journey
Architect's Journey
Mar 30, 2022 · Databases

How Does MySQL InnoDB Ensure ACID Guarantees?

This article breaks down how MySQL's InnoDB engine guarantees the four ACID properties—atomicity, consistency, isolation, and durability—by leveraging undo and redo logs, the binary log, hidden transaction metadata, and MVCC with ReadView, illustrating each mechanism with concrete examples.

ACIDInnoDBMVCC
0 likes · 9 min read
How Does MySQL InnoDB Ensure ACID Guarantees?
政采云技术
政采云技术
Mar 17, 2022 · Databases

InnoDB Lock System: Types, Modes, Structures, and Compatibility

This article explains InnoDB's lock system in MySQL, covering lock granularity, intent, shared, exclusive and auto‑increment locks, row‑lock types, the underlying C++ structures, lock mode and type encoding, and the compatibility and strength matrices that govern lock acquisition and waiting.

InnoDBc++concurrency
0 likes · 13 min read
InnoDB Lock System: Types, Modes, Structures, and Compatibility
DaTaobao Tech
DaTaobao Tech
Mar 7, 2022 · Databases

MySQL InnoDB Lock Types and Deadlock Analysis

The article explains MySQL InnoDB lock scopes and modes—including record, gap, next‑key and insert‑intention locks—illustrates a deadlock caused by concurrent inserts on a distributed lock table, and recommends limiting concurrency, sharding by business key, and splitting lock operations into smaller sub‑transactions to avoid such deadlocks.

InnoDBLockdatabase
0 likes · 16 min read
MySQL InnoDB Lock Types and Deadlock Analysis
IT Services Circle
IT Services Circle
Feb 24, 2022 · Databases

Understanding InnoDB Data Pages, Index Directories, and B+ Tree Indexing

This article explains how InnoDB stores data in 16 KB pages, links pages via a double‑linked list, uses page directories and primary‑key directories for binary search, and builds B+‑tree index pages to accelerate MySQL queries, covering free space, page splits, and the overall search flow.

B+TreeData PageInnoDB
0 likes · 8 min read
Understanding InnoDB Data Pages, Index Directories, and B+ Tree Indexing
dbaplus Community
dbaplus Community
Feb 21, 2022 · Databases

Why Updating Non‑Indexed Columns Can Lock the Whole Table in MySQL

Through a series of MySQL 5.7.26 experiments the article reveals how record‑level locks are applied to primary‑key indexes when non‑indexed columns are locked, how isolation levels (READ COMMITTED vs REPEATABLE READ) change the locking order, and why both SELECT … FOR UPDATE and UPDATE statements can block other transactions.

InnoDBIsolation LevelsRecord Locks
0 likes · 14 min read
Why Updating Non‑Indexed Columns Can Lock the Whole Table in MySQL
dbaplus Community
dbaplus Community
Feb 10, 2022 · Databases

Why MySQL Delete Doesn’t Free Space and How InnoDB Reclaims It

This article explains why MySQL’s DELETE only sets a delete‑mark, how InnoDB’s MVCC and purge thread reuse freed pages, the impact of B+‑tree storage on I/O, page merge and split mechanisms, and the proper way to rebuild tables to recover space.

B+TreeDatabase StorageDelete Mark
0 likes · 14 min read
Why MySQL Delete Doesn’t Free Space and How InnoDB Reclaims It
Aikesheng Open Source Community
Aikesheng Open Source Community
Feb 9, 2022 · Databases

Performance Evaluation of Parallel DDL in MySQL 8.0.27

This article investigates how the innodb_ddl_threads, innodb_ddl_buffer_size, and innodb_parallel_read_threads variables introduced in MySQL 8.0.27 affect parallel DDL execution speed and resource consumption, using a 50‑million‑row test table and presenting detailed benchmark results.

Database OptimizationInnoDBParallel DDL
0 likes · 7 min read
Performance Evaluation of Parallel DDL in MySQL 8.0.27
Programmer DD
Programmer DD
Feb 9, 2022 · Databases

Why Full Table Scans Won’t Exhaust MySQL Server Memory

Even when scanning a 200 GB InnoDB table on a server with only 100 GB RAM, MySQL streams results using a small net buffer and an optimized InnoDB buffer‑pool LRU, so the server’s memory never blows up, though I/O load remains high.

Full Table ScanInnoDBLRU algorithm
0 likes · 11 min read
Why Full Table Scans Won’t Exhaust MySQL Server Memory
ITPUB
ITPUB
Jan 28, 2022 · Databases

6 Common MySQL Index Pitfalls That Kill Query Performance

This article explains MySQL's index storage structures, the difference between clustered and secondary indexes, and demonstrates six typical scenarios—wildcard LIKE, functions on indexed columns, expression calculations, implicit type conversion, left‑most rule violations in composite indexes, and OR conditions—that cause indexes to become ineffective and lead to full‑table scans.

InnoDBMyISAMindex
0 likes · 16 min read
6 Common MySQL Index Pitfalls That Kill Query Performance
JavaEdge
JavaEdge
Jan 21, 2022 · Databases

Can MySQL Handle a 100 GB Full Table Scan Without Crashing?

This article explains why a MySQL query that scans a 100‑gigabyte table and returns millions of rows does not exhaust server memory, describing the net_buffer mechanism, socket send buffer behavior, InnoDB buffer‑pool management, and the improved LRU algorithm used to keep large scans from degrading overall performance.

Full Table ScanInnoDBLRU
0 likes · 8 min read
Can MySQL Handle a 100 GB Full Table Scan Without Crashing?
政采云技术
政采云技术
Jan 20, 2022 · Databases

InnoDB MVCC: Concepts, Implementation, and Visibility Rules

This article explains InnoDB's Multi-Version Concurrency Control (MVCC) mechanism, detailing undo log, readview, hidden columns, visibility algorithms for RR and RC isolation levels, and includes source code snippets illustrating read view assignment and visibility checks.

Database InternalsInnoDBIsolation Levels
0 likes · 12 min read
InnoDB MVCC: Concepts, Implementation, and Visibility Rules
JavaEdge
JavaEdge
Jan 13, 2022 · Databases

Ensuring Redo Log and Binlog Consistency in InnoDB with Two‑Phase Commit

This article explains how InnoDB’s two‑phase commit mechanism keeps the redo log and binlog logically consistent, illustrating failure scenarios, the impact on data recovery, and how the prepare‑commit split prevents inconsistencies in MySQL’s storage engine.

BinlogInnoDBdatabase-consistency
0 likes · 4 min read
Ensuring Redo Log and Binlog Consistency in InnoDB with Two‑Phase Commit
Top Architect
Top Architect
Jan 11, 2022 · Databases

Understanding InnoDB Primary‑Key B+Tree Capacity and Height

This article explains how InnoDB stores data in 16 KB pages, calculates how many rows a B+Tree index can hold, shows how to determine the tree height from the page level, and answers why MySQL uses B+Tree rather than other tree structures.

B+TreeDatabase IndexInnoDB
0 likes · 10 min read
Understanding InnoDB Primary‑Key B+Tree Capacity and Height
Java Architect Essentials
Java Architect Essentials
Dec 14, 2021 · Databases

Why LIMIT Can Slow Down MySQL Queries and How to Fix It

Using LIMIT with a large offset in MySQL can cause severe performance degradation due to excessive random I/O, but by rewriting the query to first fetch primary keys in a subquery and then joining, execution time can drop from seconds to milliseconds, as demonstrated with real data.

InnoDBLIMITbuffer pool
0 likes · 10 min read
Why LIMIT Can Slow Down MySQL Queries and How to Fix It
Top Architect
Top Architect
Dec 5, 2021 · Databases

Why MySQL Table Size Does Not Decrease After DELETE and How to Reduce It

This article explains why deleting rows in MySQL does not shrink the underlying table file, describes the InnoDB storage mechanics that cause this behavior, and provides practical solutions such as OPTIMIZE TABLE, ALTER TABLE, and Online DDL to reclaim space and avoid table‑locking issues.

ALTER TABLEDELETEInnoDB
0 likes · 8 min read
Why MySQL Table Size Does Not Decrease After DELETE and How to Reduce It
政采云技术
政采云技术
Nov 30, 2021 · Databases

Overview of MySQL and InnoDB Storage Engine Architecture

This article provides a comprehensive overview of MySQL, detailing its configuration file search order, component architecture, various storage engines such as MyISAM, NDB, Memory, and an in‑depth examination of InnoDB’s internal structures, memory management, background threads, LRU handling, redo log buffering, and checkpoint mechanisms.

CheckpointDatabase ArchitectureInnoDB
0 likes · 26 min read
Overview of MySQL and InnoDB Storage Engine Architecture
Java Interview Crash Guide
Java Interview Crash Guide
Nov 29, 2021 · Databases

How Many Rows Can a MySQL InnoDB B+ Tree Store?

This article explains the storage units of InnoDB, calculates how many rows a B+ tree can hold at different heights, shows how to determine the tree height from the page level, and answers why MySQL uses B+ trees for indexing.

B+TreeDatabase IndexInnoDB
0 likes · 9 min read
How Many Rows Can a MySQL InnoDB B+ Tree Store?
Programmer DD
Programmer DD
Nov 11, 2021 · Databases

Understanding MySQL Auto‑Increment IDs and Their Limits

This article explains the different types of auto‑increment identifiers used by MySQL—including table primary keys, InnoDB row_id, Xid, trx_id, and thread_id—describes how they reach their maximum values, the consequences of overflow, and compares external solutions such as Redis‑based keys.

InnoDBXidauto_increment
0 likes · 8 min read
Understanding MySQL Auto‑Increment IDs and Their Limits
Top Architect
Top Architect
Nov 9, 2021 · Databases

Understanding MySQL Indexes: Types, Structures, and Usage

This article explains MySQL index fundamentals, classifies indexes by data structure, storage engine, field characteristics and column count, compares B+Tree with B‑Tree, hash and red‑black trees, and demonstrates practical creation, usage, and optimization techniques with SQL examples and diagrams.

B+TreeInnoDBindex
0 likes · 14 min read
Understanding MySQL Indexes: Types, Structures, and Usage
Selected Java Interview Questions
Selected Java Interview Questions
Nov 6, 2021 · Databases

Understanding MySQL Indexes: B+Tree Structure, Engine Implementations, and Optimization Techniques

This article explains the fundamentals of MySQL indexes, focusing on B+Tree structures, differences between MyISAM and InnoDB implementations, practical indexing strategies, configuration and SQL tuning tips, and provides a detailed case study with EXPLAIN analysis to help developers design efficient indexes.

B+TreeInnoDBexplain
0 likes · 26 min read
Understanding MySQL Indexes: B+Tree Structure, Engine Implementations, and Optimization Techniques
JavaEdge
JavaEdge
Oct 29, 2021 · Databases

Mastering MySQL: Normal Forms, Storage Engines, Indexes, Transactions, and Optimization

This comprehensive guide covers MySQL fundamentals such as the three normal forms, differences between InnoDB and MyISAM, auto‑increment primary key behavior, index types and design principles, transaction isolation levels, MVCC, logging mechanisms, two‑phase commit, query execution, replication, high‑availability architectures, and practical performance tuning techniques.

Database IndexesInnoDBmysql
0 likes · 39 min read
Mastering MySQL: Normal Forms, Storage Engines, Indexes, Transactions, and Optimization
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Oct 28, 2021 · Databases

MySQL Upgrade Guide: Principles, 8.0 Changes, Pre‑Upgrade Checks, and Step‑by‑Step In‑Place & Logical Migration

This article outlines the principles, recommended practices, and detailed steps for upgrading MySQL from 5.7 to 8.0, covering version compatibility, major 8.0 feature changes, pre‑upgrade checks, in‑place and logical migration procedures, and essential configuration adjustments with example commands.

ConfigurationInnoDBdatabase migration
0 likes · 23 min read
MySQL Upgrade Guide: Principles, 8.0 Changes, Pre‑Upgrade Checks, and Step‑by‑Step In‑Place & Logical Migration
Top Architect
Top Architect
Oct 27, 2021 · Databases

Understanding MySQL InnoDB Deadlocks: Types, Causes, and Prevention Strategies

This article explains MySQL InnoDB lock types, analyzes common deadlock scenarios with detailed SQL examples, describes the underlying locking mechanisms such as next‑key and gap locks, and provides practical prevention and resolution techniques for developers working with transactional databases.

InnoDBconcurrencydatabase
0 likes · 13 min read
Understanding MySQL InnoDB Deadlocks: Types, Causes, and Prevention Strategies
dbaplus Community
dbaplus Community
Oct 17, 2021 · Databases

Why a 4‑TB MySQL Instance Hangs on Startup and How to Fix It

A detailed forensic analysis reveals that a MySQL 5.7 instance stalls during startup due to a mismatch between InnoDB flush‑sync settings and truncate‑related redo logs, and the article explains how to diagnose the issue with TOP, stack traces, and source‑code inspection, then offers three practical work‑arounds.

DBAInnoDBdebugging
0 likes · 15 min read
Why a 4‑TB MySQL Instance Hangs on Startup and How to Fix It
Ops Development Stories
Ops Development Stories
Oct 12, 2021 · Databases

Mastering Database Indexes: From Binary Trees to B+Trees and Beyond

This article explains the fundamentals and structures of database indexes—including binary trees, red‑black trees, B‑Tree, B+Tree, hash indexes—and details how MySQL’s InnoDB and MyISAM engines implement clustered and non‑clustered indexes, covering their characteristics, storage files, and query behavior.

B+TreeDatabase IndexesHash Index
0 likes · 9 min read
Mastering Database Indexes: From Binary Trees to B+Trees and Beyond
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Oct 11, 2021 · Databases

Understanding MVCC and Transaction Isolation Levels in InnoDB

This article explains the fundamentals of MVCC, transaction isolation levels, and related concepts such as ACID properties, dirty reads, non‑repeatable reads, phantom reads, hidden columns, undo logs, version chains, read views, and demonstrates how InnoDB implements these mechanisms with practical SQL examples and diagrams.

InnoDBMVCCRead View
0 likes · 21 min read
Understanding MVCC and Transaction Isolation Levels in InnoDB
Qunar Tech Salon
Qunar Tech Salon
Oct 11, 2021 · Databases

Resolving Data Inconsistency in Percona XtraDB Cluster Caused by MyISAM Tables and Applying pt-online-schema-change

This article documents a real‑world incident where a MyISAM table in a Percona XtraDB Cluster caused data inconsistency and node self‑shutdown, analyzes the root cause, and describes how using pt-online-schema-change together with proper engine conversion restored consistency across the cluster.

Database operationsInnoDBMyISAM
0 likes · 14 min read
Resolving Data Inconsistency in Percona XtraDB Cluster Caused by MyISAM Tables and Applying pt-online-schema-change
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Oct 10, 2021 · Databases

Understanding InnoDB Locking Mechanisms: Record Lock, Gap Lock, and Next-Key Lock

This article explains MySQL InnoDB's locking mechanisms—including record locks, gap locks, and next‑key locks—detailing how they work, their interaction with isolation levels such as Repeatable Read, and the principles, optimizations, and examples that illustrate their impact on concurrency and phantom reads.

InnoDBconcurrencydatabase
0 likes · 12 min read
Understanding InnoDB Locking Mechanisms: Record Lock, Gap Lock, and Next-Key Lock
Top Architect
Top Architect
Oct 3, 2021 · Databases

Understanding the INSERT Locking Process in MySQL by Analyzing the Source Code

This article examines MySQL's INSERT locking behavior, explains why phantom reads do not occur under REPEATABLE READ isolation, and walks through compiling the MySQL source, debugging lock acquisition, and the role of insert‑intention and gap locks using detailed code examples and execution traces.

Gap LockInnoDBInsert
0 likes · 18 min read
Understanding the INSERT Locking Process in MySQL by Analyzing the Source Code
Top Architect
Top Architect
Sep 21, 2021 · Databases

Understanding MySQL LIMIT OFFSET Performance and Buffer‑Pool Impact

The article demonstrates how a large OFFSET in a MySQL LIMIT query forces MySQL to scan millions of index rows and data pages, causing severe slowdown, and shows that rewriting the query with an inner‑join sub‑select dramatically reduces I/O and buffer‑pool usage, confirming the performance difference through experiments.

InnoDBLIMITOFFSET
0 likes · 8 min read
Understanding MySQL LIMIT OFFSET Performance and Buffer‑Pool Impact
Programmer DD
Programmer DD
Sep 13, 2021 · Databases

COUNT(*), COUNT(1) or COUNT(column) in MySQL? Which Is Faster?

This article compares MySQL's COUNT(*), COUNT(1) and COUNT(column) functions, explains how each handles NULL values, analyzes performance differences on MyISAM and InnoDB engines, and provides practical recommendations for writing efficient count queries and existence checks.

COUNT(1)COUNT(column)InnoDB
0 likes · 9 min read
COUNT(*), COUNT(1) or COUNT(column) in MySQL? Which Is Faster?
Top Architect
Top Architect
Sep 10, 2021 · Databases

Optimizing MySQL LIMIT Queries by Reducing Unnecessary Row Scans

This article explains why using a large OFFSET with MySQL LIMIT can cause severe performance degradation, demonstrates the problem with a real‑world 9.5 million‑row table, and shows how rewriting the query with a sub‑query that selects only primary keys can cut execution time from seconds to milliseconds.

InnoDBLIMITSQL Optimization
0 likes · 8 min read
Optimizing MySQL LIMIT Queries by Reducing Unnecessary Row Scans
JavaEdge
JavaEdge
Sep 10, 2021 · Databases

MySQL Lock Types Explained: Row, Gap, Metadata and Deadlock Prevention

This article examines MySQL’s locking mechanisms—including shared and exclusive row locks, gap and next‑key locks, table‑level and metadata locks—detailing how different SQL statements and index types affect lock acquisition, illustrating lock behavior with examples, and offering practical strategies to avoid deadlocks.

InnoDBLocksdeadlock
0 likes · 15 min read
MySQL Lock Types Explained: Row, Gap, Metadata and Deadlock Prevention
Qunar Tech Salon
Qunar Tech Salon
Sep 9, 2021 · Databases

InnoDB Startup Hang Analysis: Truncate, Flush Sync, and Debugging Strategies

An in-depth investigation of a MySQL InnoDB startup deadlock caused by truncate operations and the innodb_flush_sync parameter, detailing log observations, stack traces, source code examination, and three practical solutions including GDB intervention, parameter adjustment, and data directory cleanup.

InnoDBTRUNCATEdebugging
0 likes · 15 min read
InnoDB Startup Hang Analysis: Truncate, Flush Sync, and Debugging Strategies
Selected Java Interview Questions
Selected Java Interview Questions
Aug 30, 2021 · Databases

MySQL Interview Questions and Answers: Indexes, InnoDB vs MyISAM, Transactions, Optimization, and Design

This article compiles a comprehensive set of MySQL interview questions covering index types, the differences between MyISAM and InnoDB, the rationale for auto‑increment primary keys, sharding strategies, ACID properties, isolation levels, storage‑engine trade‑offs, normalization, index best practices, data types, performance tuning, locking mechanisms, B+Tree characteristics, and common SQL operations.

Database designInnoDBTransactions
0 likes · 28 min read
MySQL Interview Questions and Answers: Indexes, InnoDB vs MyISAM, Transactions, Optimization, and Design
Programmer DD
Programmer DD
Aug 29, 2021 · Databases

Why MySQL DELETE Doesn’t Shrink Table Size and How to Fix It

This article explains why MySQL's DELETE command only marks rows as reusable without shrinking the .ibd file, describes the underlying B+‑tree storage mechanism, and provides practical solutions such as OPTIMIZE TABLE, ALTER TABLE, and online DDL options to reclaim space and avoid table‑level locks.

DELETEInnoDBOnline DDL
0 likes · 7 min read
Why MySQL DELETE Doesn’t Shrink Table Size and How to Fix It
Architect's Journey
Architect's Journey
Aug 26, 2021 · Databases

Peeling Back MySQL InnoDB: A Deep Dive into Its Storage Engine

This article dissects MySQL's InnoDB storage engine by first exposing the internal page layout, then explaining the clustered index organization, and finally detailing the slot mechanism used for intra‑page queries, while illustrating insertion strategies and space‑reclamation techniques.

Clustered IndexDatabase InternalsInnoDB
0 likes · 11 min read
Peeling Back MySQL InnoDB: A Deep Dive into Its Storage Engine
Top Architect
Top Architect
Aug 26, 2021 · Databases

Understanding MySQL Locks: Table, Row, and Page Locking Mechanisms

This article explains why MySQL uses locks, describes table‑level, row‑level, and page‑level locking, outlines lock types such as shared, exclusive, and intention locks, and provides practical usage examples and common troubleshooting tips for InnoDB and other storage engines.

InnoDBLocksconcurrency
0 likes · 7 min read
Understanding MySQL Locks: Table, Row, and Page Locking Mechanisms
dbaplus Community
dbaplus Community
Aug 24, 2021 · Databases

Why Slow SQL Hurts Your MySQL and How to Fix It

This article explains the dangers of slow SQL in MySQL, walks through the query execution flow, details InnoDB storage engine architecture and index types, and provides practical strategies for indexing, query rewriting, and configuration to eliminate performance bottlenecks.

InnoDBmysqlslow-query
0 likes · 14 min read
Why Slow SQL Hurts Your MySQL and How to Fix It
FunTester
FunTester
Aug 20, 2021 · Databases

Why Is One MySQL CPU Core at 99%? A Step‑by‑Step Troubleshooting Guide

During a performance test a MySQL server showed one CPU core constantly at 99% while the others were idle, prompting a detailed investigation that checks I/O thread settings, multi‑core utilization, transaction locks, slow‑query logging, and index optimization to resolve the bottleneck.

Database OptimizationInnoDBSlow Query Log
0 likes · 6 min read
Why Is One MySQL CPU Core at 99%? A Step‑by‑Step Troubleshooting Guide
21CTO
21CTO
Aug 16, 2021 · Databases

Why LIMIT with Large Offsets Slows MySQL and How to Fix It

This article explains why MySQL queries using LIMIT with a large offset become extremely slow, demonstrates the inefficiency through a 950‑million‑row table example, and shows how rewriting the query with a sub‑select join reduces execution time from seconds to milliseconds while preserving results.

InnoDBSQL Optimizationbuffer pool
0 likes · 9 min read
Why LIMIT with Large Offsets Slows MySQL and How to Fix It
Top Architect
Top Architect
Aug 16, 2021 · Databases

Understanding MySQL Auto‑Increment IDs and Their Limits

This article explains the various types of auto‑increment identifiers in MySQL—including table primary keys, InnoDB row_id, Xid, trx_id, thread_id—and discusses their maximum values, overflow behavior, and alternative solutions such as using Redis for external unique keys.

InnoDBauto_incrementmysql
0 likes · 8 min read
Understanding MySQL Auto‑Increment IDs and Their Limits
ITPUB
ITPUB
Aug 13, 2021 · Databases

Why LIMIT with Large OFFSET Slows MySQL and How to Speed It Up

When a MySQL query uses LIMIT with a large offset on a table of millions of rows, the database must scan hundreds of thousands of index entries and corresponding clustered rows, causing massive random I/O; rewriting the query with a sub‑query join reduces I/O dramatically, cutting execution time from over a minute to under a second while also preventing buffer‑pool pollution.

InnoDBLIMITbuffer pool
0 likes · 9 min read
Why LIMIT with Large OFFSET Slows MySQL and How to Speed It Up
ITFLY8 Architecture Home
ITFLY8 Architecture Home
Aug 11, 2021 · Databases

How MySQL InnoDB Guarantees ACID: Locks, MVCC, and Log Mechanics

This article explains how MySQL's InnoDB engine implements ACID properties by detailing transaction atomicity, consistency, isolation levels, lock granularity, MVCC version chains, undo/redo logs, buffer pool behavior, and the interplay between redo log and binlog to ensure durability and data integrity.

ACIDInnoDBLock
0 likes · 16 min read
How MySQL InnoDB Guarantees ACID: Locks, MVCC, and Log Mechanics
Wukong Talks Architecture
Wukong Talks Architecture
Aug 4, 2021 · Databases

Understanding MySQL InnoDB Locks: Shared, Exclusive, Intention, Gap, Next‑Key, Auto‑Inc, and Predicate Locks

The article presents a detailed interview‑style walkthrough of MySQL InnoDB locking mechanisms, covering table‑ versus row‑level locks, shared and exclusive locks, intention locks, gap and next‑key locks, auto‑increment locks, predicate locks, and related SQL statements, illustrated with tables and code examples.

InnoDBLocksconcurrency
0 likes · 13 min read
Understanding MySQL InnoDB Locks: Shared, Exclusive, Intention, Gap, Next‑Key, Auto‑Inc, and Predicate Locks
Top Architect
Top Architect
Jul 19, 2021 · Databases

Why MySQL DELETE Does Not Reduce Table File Size and How to Shrink It

The article explains why deleting rows in MySQL does not shrink the physical table file, describes the underlying InnoDB storage mechanisms, and provides practical methods such as OPTIMIZE TABLE, ALTER TABLE, and Online DDL to reclaim space and reorganize the table.

ALTER TABLEDELETEDatabase Maintenance
0 likes · 7 min read
Why MySQL DELETE Does Not Reduce Table File Size and How to Shrink It
dbaplus Community
dbaplus Community
Jul 6, 2021 · Databases

Why Do MySQL Transactions Deadlock and How Can You Prevent It?

This article explains the root causes of MySQL deadlocks in InnoDB, walks through transaction and lock fundamentals, analyzes real‑world log cases, and presents practical solutions such as adjusting isolation levels, using SELECT FOR UPDATE, adding unique indexes, or checking existence before deletion to eliminate deadlocks.

InnoDBLockdatabase
0 likes · 12 min read
Why Do MySQL Transactions Deadlock and How Can You Prevent It?
New Oriental Technology
New Oriental Technology
Jun 28, 2021 · Databases

InnoDB Architecture and Key Features: A Comprehensive Overview

This article provides a comprehensive overview of InnoDB architecture, covering its memory structures, background threads, and key features like checkpoint mechanisms, double write, and neighbor page flushing, essential for understanding MySQL's default storage engine.

Background ThreadsCheckpoint MechanismDatabase Architecture
0 likes · 12 min read
InnoDB Architecture and Key Features: A Comprehensive Overview
Architect's Alchemy Furnace
Architect's Alchemy Furnace
Jun 27, 2021 · Databases

Why B+Tree Beats B-Tree: Unlocking MySQL InnoDB Performance

This article explains how B+Tree improves disk I/O efficiency in MySQL InnoDB by detailing disk storage fundamentals, sector/block/page concepts, the differences between B‑Tree and B+Tree, and practical search examples that illustrate reduced I/O operations and faster queries.

B+TreeDatabase IndexDisk I/O
0 likes · 15 min read
Why B+Tree Beats B-Tree: Unlocking MySQL InnoDB Performance
High Availability Architecture
High Availability Architecture
Jun 18, 2021 · Databases

Polar Index: Removing the Global Index Latch to Accelerate InnoDB B‑Tree SMO Operations

The article explains how PolarDB's Polar Index redesigns InnoDB B‑Tree structural modification (SMO) by splitting the operation into two phases, eliminating the global index latch, reducing lock granularity, and achieving up to 11× performance gains in high‑concurrency workloads such as TPCC.

B+TreeDatabase PerformanceIndex Latch
0 likes · 12 min read
Polar Index: Removing the Global Index Latch to Accelerate InnoDB B‑Tree SMO Operations
Top Architect
Top Architect
Jun 16, 2021 · Databases

Understanding MySQL Memory Management and When to Shard Tables

The article explains how MySQL uses different memory areas such as Thread Memory, Sharing, and InnoDB Buffer Pool, describes the impact of large user tables on query performance, and shows that when a table size exceeds the InnoDB buffer pool capacity, sharding becomes necessary.

Database PerformanceInnoDBLinux
0 likes · 17 min read
Understanding MySQL Memory Management and When to Shard Tables
Open Source Linux
Open Source Linux
Jun 10, 2021 · Databases

MySQL vs MariaDB: Real-World Performance Benchmark and Analysis

This article reviews the history of MySQL and MariaDB, describes a test environment, runs insertion, batch, and query benchmarks (with and without indexes), and concludes that MariaDB generally outperforms MySQL in speed and memory usage while highlighting trade‑offs of indexing.

Database PerformanceInnoDBMariaDB
0 likes · 9 min read
MySQL vs MariaDB: Real-World Performance Benchmark and Analysis
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 SELECTInnoDBindex
0 likes · 13 min read
Understanding Table Locks in MySQL When Using INSERT INTO SELECT and the Impact of Isolation Levels
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Jun 5, 2021 · Databases

How Many Rows Can a MySQL InnoDB B+Tree Store?

This article explains InnoDB's storage hierarchy (sector, block, page), calculates how many rows fit in a 16KB page, shows how B+‑tree height and pointer counts determine total record capacity, and demonstrates the I/O cost of primary and secondary index lookups using practical MySQL commands.

B+TreeInnoDBPage Size
0 likes · 8 min read
How Many Rows Can a MySQL InnoDB B+Tree Store?
Top Architect
Top Architect
May 26, 2021 · Databases

How MySQL InnoDB Implements ACID: Locks, MVCC, and Logging

This article explains how MySQL InnoDB guarantees the ACID properties—Atomicity, Consistency, Isolation, and Durability—through its lock mechanisms, multi‑version concurrency control, undo/redo logs, buffer pool management, and the interaction between binlog and redo log.

ACIDInnoDBLock
0 likes · 12 min read
How MySQL InnoDB Implements ACID: Locks, MVCC, and Logging
Programmer DD
Programmer DD
May 22, 2021 · Databases

Master MySQL Indexes: B+Tree Deep Dive & Optimization Tips

This article explains MySQL's B‑Tree index fundamentals, compares MyISAM and InnoDB implementations, outlines how B+Tree structures work, and provides practical guidelines for designing effective indexes and tuning MySQL configuration to boost query performance.

B+TreeDatabase OptimizationInnoDB
0 likes · 27 min read
Master MySQL Indexes: B+Tree Deep Dive & Optimization Tips