Tagged articles
866 articles
Page 3 of 9
Aikesheng Open Source Community
Aikesheng Open Source Community
Apr 1, 2024 · Databases

Understanding MySQL Instant DDL: What DBAs Should Know

The article explains MySQL 8.0's INSTANT DDL algorithm, its default behavior, limitations such as the 64‑change cap, and provides practical recommendations for always specifying the algorithm, monitoring instant changes via INFORMATION_SCHEMA, and safely rebuilding tables when needed.

Database AdministrationInnoDBInstant DDL
0 likes · 7 min read
Understanding MySQL Instant DDL: What DBAs Should Know
Top Architect
Top Architect
Mar 31, 2024 · Databases

Understanding MySQL Auto‑Increment IDs, Their Limits, and Alternative Strategies

This article explains how MySQL auto‑increment primary keys work, the practical limits of various internal IDs such as auto‑increment, InnoDB row_id, Xid, trx_id, and thread_id, and compares them with external solutions like Redis‑based auto‑increment keys, providing guidance on choosing the right approach for different scenarios.

InnoDBauto_incrementmysql
0 likes · 10 min read
Understanding MySQL Auto‑Increment IDs, Their Limits, and Alternative Strategies
Su San Talks Tech
Su San Talks Tech
Mar 7, 2024 · Databases

Master MySQL Locks: Types, Mechanisms, and How to Avoid Deadlocks

This article explains why MySQL uses locks, categorizes lock types from global to row level, details their implementation and commands, and shows how intention, metadata, and auto‑increment locks work while offering strategies to prevent deadlocks and lock contention.

InnoDBLocksauto_increment
0 likes · 13 min read
Master MySQL Locks: Types, Mechanisms, and How to Avoid Deadlocks
MaGe Linux Operations
MaGe Linux Operations
Feb 26, 2024 · Databases

Why MySQL Single Tables Hit Performance Limits and How B‑Link Trees Help

This article examines the technical reasons why MySQL single tables struggle with massive data volumes, debunks the index‑depth myth, explains InnoDB's SMO concurrency bottlenecks, and shows how B‑Link Tree indexes and heap‑organized tables in GaussDB provide superior performance for large‑scale workloads.

B-Link TreeB-TreeDatabase Performance
0 likes · 10 min read
Why MySQL Single Tables Hit Performance Limits and How B‑Link Trees Help
Su San Talks Tech
Su San Talks Tech
Feb 25, 2024 · Databases

Why MySQL Indexes Fail: B+ Tree Mechanics and Common Pitfalls

This article explains how InnoDB stores data pages and builds B+‑tree indexes, illustrates the structure of clustered, secondary and composite indexes, and enumerates typical scenarios—such as left‑most prefix violations, LIKE patterns, and function use—that cause index loss and full‑table scans.

B+TreeInnoDBdatabase
0 likes · 16 min read
Why MySQL Indexes Fail: B+ Tree Mechanics and Common Pitfalls
Cognitive Technology Team
Cognitive Technology Team
Feb 19, 2024 · Databases

Understanding MySQL Deadlocks and How to Prevent Them

This article explains MySQL deadlocks, describing how they occur in InnoDB due to resource contention, outlines common causes such as race conditions, poor indexing, long transactions, lock upgrades, and provides practical prevention strategies including deadlock detection, short transactions, query optimization, lock timeouts, monitoring tools, lock ordering, and appropriate lock levels.

InnoDBdatabasedeadlock
0 likes · 5 min read
Understanding MySQL Deadlocks and How to Prevent Them
MaGe Linux Operations
MaGe Linux Operations
Feb 13, 2024 · Databases

How to Detect, Diagnose, and Prevent MySQL InnoDB Deadlocks

This guide explains what MySQL deadlocks are, shows how to use InnoDB status and performance‑schema queries to locate them, demonstrates a reproducible deadlock scenario, and provides practical prevention techniques such as reducing transaction size, quick commits, proper indexing, and consistent access order.

InnoDBPreventiondeadlock
0 likes · 11 min read
How to Detect, Diagnose, and Prevent MySQL InnoDB Deadlocks
Cognitive Technology Team
Cognitive Technology Team
Feb 2, 2024 · Databases

Read and Write Anomalies in Concurrent Transactions and Their Mitigation Strategies

This article explains the various read and write anomalies that can occur during concurrent database transactions—such as dirty reads, nonrepeatable reads, phantom reads, lost updates, dirty writes, and write skew—and outlines isolation levels and practical techniques like MVCC, atomic updates, explicit locking, and compare‑and‑set to prevent them.

InnoDBLost UpdateMVCC
0 likes · 7 min read
Read and Write Anomalies in Concurrent Transactions and Their Mitigation Strategies
ITPUB
ITPUB
Jan 27, 2024 · Databases

How Many Rows Can a Single MySQL Table Really Hold? Detailed B+‑Tree Calculations

This article consolidates theory and real‑world examples to show how MySQL’s B+‑tree structure, page layout, and row format determine the maximum number of records a single table can store, providing step‑by‑step calculations for both int and bigint primary keys.

B+TreeData CapacityDatabase design
0 likes · 12 min read
How Many Rows Can a Single MySQL Table Really Hold? Detailed B+‑Tree Calculations
Java Tech Enthusiast
Java Tech Enthusiast
Jan 13, 2024 · Databases

Understanding MySQL COUNT() Performance and Optimization Strategies

The article explains why counting rows in large MySQL tables—especially with InnoDB—can become slow, compares COUNT() performance across storage engines and query forms, and offers optimization tactics such as using metadata counts, EXPLAIN estimates, a dedicated counting table, or periodic batch processing for accurate or approximate results.

InnoDB_countdatabase
0 likes · 12 min read
Understanding MySQL COUNT() Performance and Optimization Strategies
Aikesheng Open Source Community
Aikesheng Open Source Community
Jan 8, 2024 · Databases

MySQL General Tablespaces: A Powerful Storage Option

This article explains what MySQL general tablespaces are, outlines their main features and benefits, provides step‑by‑step commands for creating, managing, and assigning tables to them, and shows monitoring queries and practical usage scenarios for improved storage efficiency and performance.

InnoDBencryptiongeneral tablespace
0 likes · 12 min read
MySQL General Tablespaces: A Powerful Storage Option
Sanyou's Java Diary
Sanyou's Java Diary
Dec 21, 2023 · Databases

What Happens Inside MySQL When You Run an UPDATE? A Deep Dive

This article explains the complete execution process of a MySQL UPDATE statement, covering InnoDB page structures, tablespaces, buffer pool caching, redo/undo logs, binlog, and the two‑phase commit mechanism, helping readers understand how MySQL ensures data consistency and durability.

InnoDBUPDATEbuffer pool
0 likes · 21 min read
What Happens Inside MySQL When You Run an UPDATE? A Deep Dive
政采云技术
政采云技术
Dec 14, 2023 · Databases

Understanding MySQL Locks: Types, Mechanisms, and Deadlock Resolution

This article explains the various lock types in MySQL—including global, table, row, metadata, and intent locks—how they work under InnoDB, demonstrates lock acquisition with SQL examples, and provides practical guidance for detecting and resolving deadlocks in production environments.

InnoDBLocksdatabase
0 likes · 17 min read
Understanding MySQL Locks: Types, Mechanisms, and Deadlock Resolution
ITPUB
ITPUB
Dec 10, 2023 · Databases

Do 20‑Million‑Row MySQL Tables Still Slow Down on SSDs? Experimental Results

The article investigates whether the long‑standing rule of avoiding MySQL tables larger than 20 million rows still holds on modern SSD‑backed instances by creating tables of varying sizes, measuring query latency under different InnoDB buffer pool configurations, and analyzing the impact of caching and index usage.

InnoDBLarge TablesSSD
0 likes · 11 min read
Do 20‑Million‑Row MySQL Tables Still Slow Down on SSDs? Experimental Results
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Nov 21, 2023 · Databases

Demonstrating MySQL Transaction Isolation Levels with Practical Examples

This article explains MySQL's four transaction isolation levels—READ UNCOMMITTED, READ COMMITTED, REPEATABLE READ, and SERIALIZABLE—by creating a simple table, inserting test data, and running step‑by‑step SQL scripts that illustrate the behavior of each level, including phenomena such as dirty reads, non‑repeatable reads, phantom reads, and locking.

InnoDBREAD UNCOMMITTEDRead Committed
0 likes · 11 min read
Demonstrating MySQL Transaction Isolation Levels with Practical Examples
Architecture & Thinking
Architecture & Thinking
Nov 17, 2023 · Databases

Mastering MySQL Transactions: ACID, Isolation Levels, and Common Pitfalls

This article explains MySQL transaction fundamentals, the necessity of ACID properties, details the four isolation levels and their impact on phenomena like dirty reads, non‑repeatable reads, and phantom reads, and provides practical SQL examples and strategies for ensuring data consistency in high‑concurrency environments.

ACIDDatabase ConcurrencyInnoDB
0 likes · 15 min read
Mastering MySQL Transactions: ACID, Isolation Levels, and Common Pitfalls
ITPUB
ITPUB
Nov 9, 2023 · Databases

Understanding MySQL Locks: When to Use Them, How They Work, and When to Avoid Them

This article explains the fundamentals of MySQL locking—including explicit and implicit locks, transaction isolation levels, next‑key and gap locks, and practical session‑based examples—so developers can decide when to apply pessimistic locks and when to prefer safer alternatives.

Database PerformanceInnoDBLocks
0 likes · 17 min read
Understanding MySQL Locks: When to Use Them, How They Work, and When to Avoid Them
Senior Tony
Senior Tony
Nov 8, 2023 · Databases

Beyond Row and Table Locks: Uncovering MySQL’s Hidden Lock Types

This article examines MySQL's comprehensive lock taxonomy, starting from common row and table locks, then delving into lesser‑known mechanisms such as global locks, intention locks, auto‑increment locks, and Latch, while explaining their commands, use‑cases, and performance implications for developers and DBAs.

InnoDBLocksauto_increment
0 likes · 10 min read
Beyond Row and Table Locks: Uncovering MySQL’s Hidden Lock Types
Architecture & Thinking
Architecture & Thinking
Nov 7, 2023 · Databases

How MySQL InnoDB Achieves High Concurrency with MVCC and Locks

This article explains MySQL InnoDB's concurrency control mechanisms—including read‑write locks, transaction isolation levels, MVCC, redo/undo logs, and rollback segments—and shows how they work together to ensure data consistency while maximizing read/write performance in high‑traffic environments.

Concurrency ControlInnoDBLocks
0 likes · 12 min read
How MySQL InnoDB Achieves High Concurrency with MVCC and Locks
Laravel Tech Community
Laravel Tech Community
Nov 6, 2023 · Databases

MySQL InnoDB Configuration Parameters and Optimization Guide

This article explains how to tune MySQL's InnoDB settings—including buffer pool size, log file configuration, I/O threads, flush behavior, and timeout values—by providing detailed explanations and exact configuration snippets to improve performance and resource usage.

ConfigurationDatabase TuningInnoDB
0 likes · 7 min read
MySQL InnoDB Configuration Parameters and Optimization Guide
Tencent Cloud Developer
Tencent Cloud Developer
Nov 6, 2023 · Databases

MySQL Lock Mechanisms: When, How, and When Not to Use

The article explains MySQL’s explicit and implicit lock mechanisms—including SELECT … FOR UPDATE, metadata, row, gap, and next‑key locks—how isolation levels affect them, and offers practical guidelines such as using optimistic locking, indexing locked columns, and avoiding long transactions to prevent phantom reads, deadlocks, and performance issues.

Database PerformanceInnoDBSQL
0 likes · 15 min read
MySQL Lock Mechanisms: When, How, and When Not to Use
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Nov 4, 2023 · Databases

Understanding MySQL Lock Types: Shared, Exclusive, Intention, Gap, Next‑Key, and Insert‑Intention Locks with Deadlock Analysis

This article explains MySQL's various lock mechanisms—including shared (S) and exclusive (X) locks, intention locks, record, gap, next‑key, and insert‑intention locks—illustrates their behavior with SQL examples, analyzes a concurrent insert deadlock scenario, and offers practical mitigation strategies.

InnoDBLocksdatabase
0 likes · 11 min read
Understanding MySQL Lock Types: Shared, Exclusive, Intention, Gap, Next‑Key, and Insert‑Intention Locks with Deadlock Analysis
ITPUB
ITPUB
Oct 31, 2023 · Databases

Demystifying MySQL InnoDB Buffers: Pool, Change, Log & Doublewrite

This article explains MySQL InnoDB’s key buffering mechanisms—buffer pool, change buffer, log buffer, and doublewrite buffer—detailing their roles, internal structures, eviction policies, and how they improve performance and data durability while handling page reads, writes, and crash recovery.

Change BufferDatabase PerformanceDoublewrite
0 likes · 14 min read
Demystifying MySQL InnoDB Buffers: Pool, Change, Log & Doublewrite
ITPUB
ITPUB
Oct 8, 2023 · Databases

Unlocking MySQL GIPKs: How Generated Invisible Primary Keys Simplify Schema Design

Starting with MySQL 8.0.30, the Generated Invisible Primary Keys (GIPKs) feature automatically adds an invisible bigint auto‑increment column named my_row_id when a table lacks an explicit primary key, simplifying schema design, easing DBA‑developer conflicts, and offering flexible handling in MGR and replication environments, while noting its limitations and usage commands.

Database designGIPKsGenerated Invisible Primary Keys
0 likes · 8 min read
Unlocking MySQL GIPKs: How Generated Invisible Primary Keys Simplify Schema Design
Su San Talks Tech
Su San Talks Tech
Oct 6, 2023 · Databases

How MySQL Executes SQL: From Connection Pools to Log Files Explained

This article walks through how a Java application interacts with MySQL, covering the driver, connection pooling, thread handling, query parsing, the optimizer, storage engine, buffer pool, undo/redo logs, binlog, and transaction commit, providing a complete end‑to‑end view of MySQL’s internal processing.

InnoDBdatabaselog
0 likes · 22 min read
How MySQL Executes SQL: From Connection Pools to Log Files Explained
dbaplus Community
dbaplus Community
Sep 27, 2023 · Databases

Understanding MySQL Locks: Which Queries Actually Acquire Locks?

This article breaks down MySQL's complex locking mechanisms—global, table, and row locks—explaining how different SELECT statements, transaction isolation levels, and index types affect lock acquisition, and provides practical test scripts and visual examples to help developers master lock behavior.

InnoDBIsolationLevelLocks
0 likes · 14 min read
Understanding MySQL Locks: Which Queries Actually Acquire Locks?
dbaplus Community
dbaplus Community
Sep 14, 2023 · Databases

Master MySQL InnoDB Locks: From Row Locks to Deadlock Prevention

This article explains why MySQL needs locking, details every InnoDB lock type—including shared, exclusive, intention, record, gap, next‑key, insert‑intention and auto‑increment locks—covers lock compatibility, deadlock causes and prevention, compares optimistic and pessimistic locking, and shows how SELECT FOR UPDATE behaves under different isolation levels.

InnoDBconcurrencydeadlock
0 likes · 20 min read
Master MySQL InnoDB Locks: From Row Locks to Deadlock Prevention
JD Retail Technology
JD Retail Technology
Sep 10, 2023 · Databases

Understanding MySQL InnoDB MVCC and Transaction Isolation Levels

This article explains MySQL InnoDB's multi-version concurrency control (MVCC), detailing how transaction isolation levels such as read‑committed and repeatable‑read create snapshots, how undo logs and hidden columns form version chains, and walks through concrete examples to show which row values are visible to concurrent transactions.

InnoDBMVCCmysql
0 likes · 12 min read
Understanding MySQL InnoDB MVCC and Transaction Isolation Levels
macrozheng
macrozheng
Sep 3, 2023 · Databases

Why a Single UPDATE Can Crash Your MySQL Database and How to Prevent It

This article explains how an UPDATE without indexed WHERE conditions can trigger full‑table next‑key locks in InnoDB, causing business downtime, and provides practical safeguards such as enabling sql_safe_updates and using FORCE INDEX to ensure safe execution.

InnoDBUPDATEindexes
0 likes · 8 min read
Why a Single UPDATE Can Crash Your MySQL Database and How to Prevent It
Aikesheng Open Source Community
Aikesheng Open Source Community
Aug 16, 2023 · Databases

Diagnosing and Resolving InnoDB Page Corruption in MySQL

This article describes how to identify, analyze, and fix InnoDB page corruption in MySQL instances, covering log inspection, querying metadata tables, using innodb_force_recovery, and the inno_space tool, with example commands and best‑practice recommendations to prevent data loss.

Database RecoveryInnoDBPage Corruption
0 likes · 11 min read
Diagnosing and Resolving InnoDB Page Corruption in MySQL
dbaplus Community
dbaplus Community
Aug 15, 2023 · Databases

What Happens When MySQL Auto‑Increment IDs Reach Their Limit?

This article explains how MySQL handles overflow of auto_increment, InnoDB row_id, Xid, trx_id, and thread_id, showing the resulting primary‑key errors, data overwrites, rare Xid collisions, a potential dirty‑read bug, and recommended safeguards such as using BIGINT.

InnoDBXidauto_increment
0 likes · 13 min read
What Happens When MySQL Auto‑Increment IDs Reach Their Limit?
Selected Java Interview Questions
Selected Java Interview Questions
Aug 11, 2023 · Databases

Introduction to MySQL Locks and Their Types

This article explains the purpose, classification, and implementation of MySQL locks—including global, table, page, row, intention, and gap/record/next-key locks—as well as optimistic and pessimistic locking strategies, providing code examples and usage scenarios for ensuring data consistency in concurrent transactions.

InnoDBIsolationLocks
0 likes · 11 min read
Introduction to MySQL Locks and Their Types
Programmer DD
Programmer DD
Aug 8, 2023 · Databases

Why Mastering MySQL Is Essential for Every Tech Professional

This article explains why MySQL, the world’s most popular open‑source relational database, is a fundamental skill for developers, operators and testers, and outlines a two‑book learning path covering installation, SQL mastery, InnoDB internals, indexing and performance optimization.

InnoDBSQLdatabase
0 likes · 7 min read
Why Mastering MySQL Is Essential for Every Tech Professional
Aikesheng Open Source Community
Aikesheng Open Source Community
Aug 2, 2023 · Databases

Understanding the Construction Process of Adaptive Hash Index (AHI) in MySQL 8.0.32

This article explains why MySQL's Adaptive Hash Index (AHI) can cause slow TRUNCATE operations, describes its benefits, and provides a detailed step‑by‑step walkthrough of the AHI construction process—including index counting, construction‑info counting, data‑page counting, and the final hash‑index building—using MySQL 8.0.32 source code examples.

Adaptive Hash IndexDatabase OptimizationInnoDB
0 likes · 27 min read
Understanding the Construction Process of Adaptive Hash Index (AHI) in MySQL 8.0.32
dbaplus Community
dbaplus Community
Jul 30, 2023 · Databases

Why a MySQL Table Can Hold 100 Million Rows Without Slowing Down

This article explains the myth of a 2 million‑row limit for MySQL tables, shows how primary‑key size and InnoDB page structure determine theoretical row limits, details B+‑tree indexing mechanics, calculates practical capacities, and compares B+‑tree with B‑tree performance.

B+TreeDatabase IndexInnoDB
0 likes · 14 min read
Why a MySQL Table Can Hold 100 Million Rows Without Slowing Down
ITPUB
ITPUB
Jul 28, 2023 · Databases

Master InnoDB Row Locking: Rules, Examples, and How Locks Are Applied

This article explains InnoDB's three row‑lock types, when MySQL statements acquire implicit or explicit locks, and walks through concrete examples for unique and non‑unique index queries, showing how Next‑key, Record and Gap locks are determined.

Database ConcurrencyInnoDBNext-key Lock
0 likes · 10 min read
Master InnoDB Row Locking: Rules, Examples, and How Locks Are Applied
MaGe Linux Operations
MaGe Linux Operations
Jul 23, 2023 · Databases

MySQL Redo, Bin, and Undo Logs Explained: Roles, Differences & Tips

This article introduces MySQL’s three primary logs—redo log, binlog, and undo log—explaining their purposes, how they ensure durability and recovery, the mechanisms for flushing them to disk, and the key differences among them, along with practical configuration recommendations.

BinlogDatabase LoggingInnoDB
0 likes · 6 min read
MySQL Redo, Bin, and Undo Logs Explained: Roles, Differences & Tips
Tongcheng Travel Technology Center
Tongcheng Travel Technology Center
Jul 19, 2023 · Databases

InnoDB Storage Model Overview and Internal Structures

This article explains how InnoDB stores data on disk, describing tablespaces, segments, extents, pages, row formats, record headers, page directories, B+‑tree indexes, and the differences between clustered and secondary indexes, with examples and diagrams to illustrate each component.

B+TreeInnoDBPage
0 likes · 26 min read
InnoDB Storage Model Overview and Internal Structures
dbaplus Community
dbaplus Community
Jul 13, 2023 · Databases

Understanding InnoDB Row Locks: Rules, Types, and Real-World Examples

This article explains InnoDB's three row‑lock types, when they are applied implicitly or explicitly, the two core locking principles, and walks through concrete examples for unique and non‑unique index equality and range queries, showing exact lock ranges and lock‑type degradations.

InnoDBSQLlocking
0 likes · 10 min read
Understanding InnoDB Row Locks: Rules, Types, and Real-World Examples
Sanyou's Java Diary
Sanyou's Java Diary
Jul 3, 2023 · Databases

Master MySQL Internals: Architecture, Logs, and Recovery Explained

This article walks through MySQL's three‑layer logical architecture, explains the roles of redo, undo, bin, and relay logs, shows how they ensure crash‑safety and point‑in‑time recovery, and provides practical commands for inspecting and configuring these logs.

BinlogDatabase LogsInnoDB
0 likes · 18 min read
Master MySQL Internals: Architecture, Logs, and Recovery Explained
Aikesheng Open Source Community
Aikesheng Open Source Community
Jun 15, 2023 · Databases

How to Shrink the InnoDB System Tablespace (ibdata1) in MySQL

This article explains the different types of InnoDB tablespaces, why the ibdata1 file can grow uncontrollably, and provides a step‑by‑step procedure—including full backup, instance recreation, and configuration of UNDO and file‑per‑table settings—to safely reduce its size in MySQL environments.

InnoDBTablespaceUNDO
0 likes · 13 min read
How to Shrink the InnoDB System Tablespace (ibdata1) in MySQL
Code Ape Tech Column
Code Ape Tech Column
Jun 12, 2023 · Databases

Understanding MySQL DDL Execution and Online DDL Mechanisms

This article explains the differences between MySQL DDL and DML, describes how online DDL works—including copy and inplace algorithms, execution phases, common pitfalls, limitations, and recent MySQL 8.0 enhancements—providing practical guidance for safely altering large tables.

DDLInnoDBOnline DDL
0 likes · 16 min read
Understanding MySQL DDL Execution and Online DDL Mechanisms
Su San Talks Tech
Su San Talks Tech
Jun 12, 2023 · Databases

Master MySQL Indexes: From B+ Trees to Index Merge and Optimization

This article explains MySQL InnoDB index fundamentals, covering index types, data structures, clustered and secondary indexes, covering indexes, index pushdown, index merge, cost‑based index selection, common index‑inefficiency scenarios, and practical guidelines for designing effective indexes.

B+TreeDatabase OptimizationInnoDB
0 likes · 31 min read
Master MySQL Indexes: From B+ Trees to Index Merge and Optimization
Liangxu Linux
Liangxu Linux
Jun 7, 2023 · Databases

Why MySQL Auto‑Increment IDs Aren’t Always Sequential (And How to Fix It)

This article explains how MySQL stores and updates auto‑increment values, why gaps appear after failed inserts, unique‑key conflicts, transaction rollbacks or batch operations, and how different innodb_autoinc_lock_mode settings and MySQL 8.0 improvements can mitigate the issue.

Database designInnoDBauto_increment
0 likes · 11 min read
Why MySQL Auto‑Increment IDs Aren’t Always Sequential (And How to Fix It)
Aikesheng Open Source Community
Aikesheng Open Source Community
Jun 6, 2023 · Databases

Why Does Inserting a Record that Triggers a Unique Index Conflict Add a Next‑Key Exclusive Lock on the Primary‑Key Supremum Record?

This article reproduces a MySQL 8.0.32 InnoDB scenario where inserting a row that violates a unique index causes a next‑key exclusive lock on the primary‑key supremum record, explains the underlying implicit‑lock mechanism, walks through the relevant source‑code stack, and details the lock‑conversion and rollback steps under REPEATABLE‑READ isolation.

Database InternalsInnoDBRepeatable Read
0 likes · 25 min read
Why Does Inserting a Record that Triggers a Unique Index Conflict Add a Next‑Key Exclusive Lock on the Primary‑Key Supremum Record?
Java Backend Technology
Java Backend Technology
May 30, 2023 · Databases

Why count(*) Slows Down MySQL and How to Optimize It

This article explains why MySQL count(*) can become a performance bottleneck on InnoDB tables, compares different count() variants, and presents practical optimization techniques such as Redis caching, second‑level caches, parallel execution, reducing joins, and offloading analytics to ClickHouse.

ClickHouseInnoDBRedis Cache
0 likes · 10 min read
Why count(*) Slows Down MySQL and How to Optimize It
Su San Talks Tech
Su San Talks Tech
May 30, 2023 · Databases

Master MySQL Indexes: From B+ Trees to Index Merge and Optimization

This article explains MySQL index fundamentals—including classification, B+‑tree and hash structures, clustered and secondary indexes, single‑ and composite‑column indexes, covering indexes, index condition pushdown, index merge strategies, cost‑based index selection, common index‑invalidating scenarios, and practical guidelines for creating effective indexes.

B+TreeDatabase PerformanceInnoDB
0 likes · 29 min read
Master MySQL Indexes: From B+ Trees to Index Merge and Optimization
Liangxu Linux
Liangxu Linux
May 29, 2023 · Databases

What Happens When MySQL Auto‑Increment IDs Reach Their Limits?

This article explains how MySQL handles overflow of various auto‑generated identifiers—including table auto_increment, InnoDB row_id, Xid, trx_id, and thread_id—detailing the wrap‑around behavior, potential data loss, and the rare edge cases that can lead to bugs.

InnoDBXidauto-increment
0 likes · 13 min read
What Happens When MySQL Auto‑Increment IDs Reach Their Limits?
Sanyou's Java Diary
Sanyou's Java Diary
May 23, 2023 · Databases

Master MySQL Indexes: From B+ Trees to Index Merge and Optimization

This article provides a comprehensive guide to MySQL indexing, covering index types, data structures, clustering vs. non‑clustering, hash and B+Tree indexes, covering indexes, index push‑down, index merge strategies, cost‑based index selection, common pitfalls, and practical indexing principles with illustrative examples and SQL snippets.

B+TreeInnoDBdatabase
0 likes · 31 min read
Master MySQL Indexes: From B+ Trees to Index Merge and Optimization
MaGe Linux Operations
MaGe Linux Operations
May 20, 2023 · Databases

What Happens When MySQL Auto‑Increment IDs Reach Their Limits?

This article explains how MySQL handles auto‑increment primary keys, InnoDB’s internal row_id, transaction Xid and trx_id counters when they reach their maximum values, the resulting primary‑key conflicts, data overwrites, and a theoretical dirty‑read bug caused by counter wrap‑around.

Database InternalsInnoDBauto_increment
0 likes · 13 min read
What Happens When MySQL Auto‑Increment IDs Reach Their Limits?
Aikesheng Open Source Community
Aikesheng Open Source Community
May 11, 2023 · Databases

Why MySQL 8.0 Upgrade Can Suddenly Slow Down Queries: The Hidden Lock Table Trap

After upgrading from MySQL 5.7 to 8.0, a client experienced a flood of slow queries despite low system load; the root cause was a change in the sys.innodb_lock_waits view that now relies on performance_schema.data_locks, whose large lock table holds a global mutex and blocks other transactions, a problem solved by adding an index to reduce lock volume.

InnoDBLockdatabase
0 likes · 11 min read
Why MySQL 8.0 Upgrade Can Suddenly Slow Down Queries: The Hidden Lock Table Trap
ITPUB
ITPUB
May 3, 2023 · Databases

Master MySQL Indexes: Types, Usage, and Optimization Tips

This comprehensive guide explains what MySQL indexes are, details various index types—including B+‑tree, hash, full‑text, and spatial—covers when indexes become ineffective, shows how to design, use, and troubleshoot them, and provides practical steps for large‑scale index management.

B+TreeInnoDBdatabase
0 likes · 19 min read
Master MySQL Indexes: Types, Usage, and Optimization Tips
ITPUB
ITPUB
Apr 19, 2023 · Databases

Can InnoDB’s REPEATABLE READ Truly Prevent Phantom Reads? A Deep Dive

This article explains how InnoDB’s REPEATABLE READ isolation level uses MVCC and gap locks to prevent most phantom reads, illustrates the mechanisms with SQL examples and diagrams, and outlines the remaining edge cases and best practices for fully avoiding phantom reads.

Gap LockInnoDBMVCC
0 likes · 9 min read
Can InnoDB’s REPEATABLE READ Truly Prevent Phantom Reads? A Deep Dive
ITPUB
ITPUB
Apr 16, 2023 · Databases

Why MySQL Indexes Matter: Understanding B+Tree vs B-Tree

This article explains MySQL index fundamentals, compares B+Tree and B-Tree structures, shows how page size and tree height affect capacity, outlines which query patterns benefit from indexes, and discusses practical limits and the adaptive hash index feature.

B+TreeInnoDBindex
0 likes · 15 min read
Why MySQL Indexes Matter: Understanding B+Tree vs B-Tree