Tagged articles
42 articles
Page 1 of 1
MaGe Linux Operations
MaGe Linux Operations
Apr 27, 2026 · Databases

Production MySQL Deadlocks: Diagnosis Strategies and Permanent Fixes

The article explains how MySQL InnoDB deadlocks occur, details the four necessary conditions, shows how to enable full deadlock logging, demonstrates queries against information_schema and performance_schema, and provides concrete scenarios with code‑level solutions to prevent and resolve deadlocks in production environments.

InnoDBPerformance Schemadeadlock
0 likes · 22 min read
Production MySQL Deadlocks: Diagnosis Strategies and Permanent Fixes
Aikesheng Open Source Community
Aikesheng Open Source Community
Sep 10, 2025 · Databases

Why SELECT … FOR UPDATE Still Reads the Primary Key: MySQL Index Scan Deep Dive

This article examines why a SELECT … FOR UPDATE query that appears to use a covering index in MySQL actually performs a table‑row lookup, detailing indirect evidence from performance_schema locks and direct proof through InnoDB source code, and explains the necessity of accessing the primary key for transaction isolation.

Database InternalsIndex ScanInnoDB
0 likes · 9 min read
Why SELECT … FOR UPDATE Still Reads the Primary Key: MySQL Index Scan Deep Dive
Aikesheng Open Source Community
Aikesheng Open Source Community
Sep 24, 2024 · Databases

Why Does a SELECT on performance_schema.data_locks Hang MySQL? Deep Dive & Fix

A batch INSERT triggers a massive lock record buildup, and a concurrent SELECT on performance_schema.data_locks causes a memory allocation error that leaves trx_sys‑mutex unreleased, leading to a full MySQL hang; the article reproduces the bug, analyses the stack, explains the root cause, and shows the official fix in MySQL 8.0.37.

Bug AnalysisInnoDBPerformance Schema
0 likes · 9 min read
Why Does a SELECT on performance_schema.data_locks Hang MySQL? Deep Dive & Fix
JavaEdge
JavaEdge
Sep 15, 2024 · Databases

What’s New in MySQL 9.0? VECTOR Type, Inline FK, JSON EXPLAIN, and More

This article summarizes MySQL 9.0’s new VECTOR column type, inline and implicit foreign‑key constraints, JSON EXPLAIN ANALYZE storage, prepared event statements, performance‑schema variable tables, enhanced EXPLAIN output, LIMIT 1 subquery support, as well as deprecated and removed features with practical examples.

Deprecated featuresEXPLAIN ANALYZEInline foreign key
0 likes · 13 min read
What’s New in MySQL 9.0? VECTOR Type, Inline FK, JSON EXPLAIN, and More
Java Tech Enthusiast
Java Tech Enthusiast
Jul 12, 2024 · Databases

New Features, Deprecations, and Removals in MySQL 9.0

MySQL 9.0, released July 2 2024, introduces EXPLAIN JSON output stored in variables, native EVENT DDL statements, and two new performance‑schema tables for variable metadata, while deprecating the old variables_info columns and removing the mysql_native_password plugin in favor of caching_sha2_password, enhancing observability and security.

AuthenticationEventPerformance Schema
0 likes · 11 min read
New Features, Deprecations, and Removals in MySQL 9.0
Aikesheng Open Source Community
Aikesheng Open Source Community
May 13, 2024 · Databases

Profiling Memory Usage in MySQL Queries

This article explains how to use MySQL's performance_schema to monitor and analyze per‑connection memory consumption, provides SQL queries to list memory instruments, shows Python scripts for sampling and visualizing memory usage over time, and demonstrates practical usage with example commands and output.

Performance SchemaPythonmemory profiling
0 likes · 14 min read
Profiling Memory Usage in MySQL Queries
Aikesheng Open Source Community
Aikesheng Open Source Community
Sep 4, 2023 · Databases

Observability of MySQL 8 Replication Using Performance Schema and Sys Schema Views

The article explains how MySQL 8 enhances replication observability by exposing detailed metrics through Performance Schema tables and sys schema views, providing DBAs with richer information such as per‑channel lag, worker thread states, and full replication status beyond the traditional SHOW REPLICA STATUS output.

InnoDB ClusterPerformance SchemaReplication
0 likes · 14 min read
Observability of MySQL 8 Replication Using Performance Schema and Sys Schema Views
Meituan Technology Team
Meituan Technology Team
Jul 6, 2023 · Databases

Meituan Database Attack‑Defense Practice: Kernel Observability, Full SQL, and Index Optimization

The article details how Meituan built a MySQL autonomous platform by constructing kernel observability to split OnCPU/OffCPU wait time, capturing full SQL directly from the kernel with compression, designing a safe exception‑handling workflow, and generating cost‑based index‑tuning suggestions—including what‑if analysis and workload‑driven recommendations—to enable comprehensive SQL governance.

Exception HandlingFull‑SQLIndex Tuning
0 likes · 34 min read
Meituan Database Attack‑Defense Practice: Kernel Observability, Full SQL, and Index Optimization
Architecture Digest
Architecture Digest
May 27, 2023 · Databases

Comprehensive MySQL Monitoring Using Built‑in SHOW Commands

This article explains how to collect extensive MySQL performance metrics—including connections, buffer pool statistics, lock information, SQL status, statement counts, throughput, server configuration, and slow‑query analysis—using only MySQL's native SHOW commands, providing practical commands, calculations, and optimization tips for effective database monitoring.

Performance Schemamonitoringslow-query
0 likes · 10 min read
Comprehensive MySQL Monitoring Using Built‑in SHOW Commands
dbaplus Community
dbaplus Community
Jan 8, 2023 · Databases

Mastering MySQL Row‑Level Locks: Rules, Types, and How to Inspect Them

This article explains how InnoDB implements row‑level locking in MySQL, detailing the lock types (record, gap, next‑key), the scenarios that trigger each lock, how unique and non‑unique indexes affect locking, and provides step‑by‑step commands and examples for analyzing locks with performance_schema.

Database ConcurrencyInnoDBLock Types
0 likes · 45 min read
Mastering MySQL Row‑Level Locks: Rules, Types, and How to Inspect Them
MaGe Linux Operations
MaGe Linux Operations
Dec 29, 2022 · Databases

Master MySQL Monitoring with Built‑in SHOW Commands: A Complete Guide

This article explains how to collect comprehensive MySQL performance data—including connections, buffer cache, locks, statement counts, throughput, server configuration, and slow‑query logs—using only native SHOW commands, providing step‑by‑step SQL snippets, calculation formulas, and best‑practice tips for efficient monitoring.

Database MonitoringPerformance SchemaSHOW commands
0 likes · 10 min read
Master MySQL Monitoring with Built‑in SHOW Commands: A Complete Guide
Laravel Tech Community
Laravel Tech Community
Dec 5, 2022 · Databases

Using MySQL Built‑in Commands for Comprehensive Database Monitoring

This article explains how to collect extensive MySQL performance metrics—including connections, buffer cache, locks, SQL status, statement counts, throughput, server configuration, and slow‑query logs—using only MySQL's native SHOW commands and the performance_schema, providing practical code snippets and optimization tips.

Performance Schemadatabasemonitoring
0 likes · 10 min read
Using MySQL Built‑in Commands for Comprehensive Database Monitoring
Architecture Digest
Architecture Digest
Nov 23, 2022 · Databases

Using MySQL Built‑in SHOW Commands for Comprehensive Database Monitoring

This article explains how to collect a wide range of MySQL performance metrics—including connections, buffer pool usage, locks, SQL statistics, statement counts, throughput, server variables, and slow‑query logs—using only MySQL's native SHOW commands and performance_schema tables, while also offering practical tuning tips and analysis tools.

Database MonitoringPerformance SchemaSlow Query Log
0 likes · 11 min read
Using MySQL Built‑in SHOW Commands for Comprehensive Database Monitoring
Tencent Database Technology
Tencent Database Technology
Sep 29, 2022 · Databases

MySQL Memory Monitoring Improvements in InnoDB 8.0.28

The article details the refactoring of memory monitoring in MySQL 8.0.28, introducing a new PFS metadata structure for precise tracking of memory allocations and deallocations across various components like Buffer Pool and user variables.

Database OptimizationInnoDBMemory Monitoring
0 likes · 9 min read
MySQL Memory Monitoring Improvements in InnoDB 8.0.28
dbaplus Community
dbaplus Community
Jul 3, 2022 · Databases

Master MySQL Clone Plugin: Installation, Usage, and Optimization

This guide explains MySQL 8.0.17's Clone Plugin—how to install it, perform local and remote clones, monitor progress via performance_schema, build replicas from cloned data, understand its internal stages, configure parameters, and compare it with XtraBackup.

BackupClone PluginDatabase Replication
0 likes · 19 min read
Master MySQL Clone Plugin: Installation, Usage, and Optimization
Aikesheng Open Source Community
Aikesheng Open Source Community
Jan 10, 2022 · Databases

Analysis of MySQL 8.0.26 Crash Caused by the terminology_use_previous Parameter and INFORMATION_SCHEMA.PROCESSLIST Access

The article investigates a MySQL 8.0.26 crash triggered by setting the terminology_use_previous parameter to BEFORE_8_0_26, analyzes stack traces and core dumps, compares processlist access methods, references related bugs, and offers mitigation recommendations for monitoring tools.

Information SchemaPerformance Schemamysql
0 likes · 12 min read
Analysis of MySQL 8.0.26 Crash Caused by the terminology_use_previous Parameter and INFORMATION_SCHEMA.PROCESSLIST Access
Aikesheng Open Source Community
Aikesheng Open Source Community
Aug 27, 2021 · Databases

Analyzing MySQL Memory Usage with tcmalloc and pprof

This article demonstrates how to use Google’s tcmalloc library and the pprof tool to capture and analyze MySQL heap dumps, revealing memory allocations that performance_schema cannot track, and explains the experimental setup, data collection, and interpretation of the resulting memory allocation graphs.

Performance SchemaTCMallocmysql
0 likes · 4 min read
Analyzing MySQL Memory Usage with tcmalloc and pprof
Tencent Database Technology
Tencent Database Technology
Aug 2, 2021 · Databases

MySQL 8.0 Resource Groups: Overview and Implementation

This article introduces MySQL 8.0's resource group feature, detailing its concepts, configuration commands, query hint usage, and the underlying implementation including new parser classes, platform APIs, runtime components, performance schema integration, and persistence mechanisms, with code examples throughout.

ParserPerformance SchemaResource Group
0 likes · 17 min read
MySQL 8.0 Resource Groups: Overview and Implementation
Aikesheng Open Source Community
Aikesheng Open Source Community
Oct 20, 2020 · Databases

MySQL 8.0.22 Release Highlights and New Features

MySQL 8.0.22 introduces prepared‑statement improvements, a new SHOW PROCESSLIST implementation via Performance Schema, UTC timestamp handling, read‑only schemas, error‑log access through Performance Schema, user‑management enhancements, optimizer push‑down, replication auto‑failover, Router scalability upgrades, and several deprecations and removals.

8.0.22Performance SchemaPrepared Statements
0 likes · 9 min read
MySQL 8.0.22 Release Highlights and New Features
vivo Internet Technology
vivo Internet Technology
Oct 14, 2020 · Databases

MySQL Clone Plugin – Installation, Usage, Progress Monitoring, Implementation Details, Limitations, and Comparison with XtraBackup

The MySQL Clone Plugin, added in 8.0.17, enables fast local or remote cloning of InnoDB data by installing the plugin, issuing CLONE commands, monitoring progress via performance_schema tables, and using the resulting GTID or binlog coordinates to build replicas, while observing limitations such as DDL restrictions and single‑instance operation, and offering advantages over XtraBackup through an extra page‑copy stage and simplified GTID handling.

Clone PluginDatabase BackupInnoDB
0 likes · 22 min read
MySQL Clone Plugin – Installation, Usage, Progress Monitoring, Implementation Details, Limitations, and Comparison with XtraBackup
Tencent Database Technology
Tencent Database Technology
Aug 4, 2020 · Databases

Root Cause Analysis of MySQL OOM in Tencent Cloud CDB Instances

This article details a comprehensive investigation of MySQL out‑of‑memory (OOM) alerts on a Tencent Cloud CDB instance during a high‑traffic marketing event, covering background, observed symptoms, step‑by‑step debugging, analysis of server and engine memory usage, relevant MySQL bugs, fetch_cache behavior, and the final configuration recommendations to prevent OOM.

Database OptimizationOOMPerformance Schema
0 likes · 14 min read
Root Cause Analysis of MySQL OOM in Tencent Cloud CDB Instances
Aikesheng Open Source Community
Aikesheng Open Source Community
Apr 21, 2020 · Databases

Diagnosing and Resolving MySQL InnoDB Row Lock Wait Timeout Errors

This article explains the causes of MySQL InnoDB row lock wait timeout errors, distinguishes row and metadata lock waits, and provides practical methods—including manual replication, monitoring scripts, general_log analysis, and Performance Schema queries—to locate, diagnose, and resolve such locking issues.

InnoDBPerformance Schemalock_wait_timeout
0 likes · 18 min read
Diagnosing and Resolving MySQL InnoDB Row Lock Wait Timeout Errors
Aikesheng Open Source Community
Aikesheng Open Source Community
Apr 3, 2020 · Databases

MySQL Internal Temporary Tables: When They Switch to Disk Storage

Through a hands‑on experiment, this article demonstrates how MySQL’s internal temporary tables, governed by tmp_table_size and max_heap_table_size, transition from in‑memory heap storage to on‑disk storage, showing the resulting I/O behavior, disk usage statistics, and the impact of engine configuration.

Disk SpillPerformance Schemamysql
0 likes · 5 min read
MySQL Internal Temporary Tables: When They Switch to Disk Storage
Aikesheng Open Source Community
Aikesheng Open Source Community
Mar 4, 2020 · Databases

Improved MySQL 8 Replication Lag Monitoring Using GTID Timestamps and Performance Schema

The article explains the shortcomings of traditional MySQL replication lag measurement, introduces the community heartbeat‑table approach and its limitations, and then details MySQL 8 enhancements (WL#7319, WL#7374) that embed transaction timestamps in binlog events and expose new performance_schema tables, providing precise SQL queries to monitor lag at various stages of the replication pipeline.

GTIDLag MonitoringPerformance Schema
0 likes · 8 min read
Improved MySQL 8 Replication Lag Monitoring Using GTID Timestamps and Performance Schema
Aikesheng Open Source Community
Aikesheng Open Source Community
Sep 3, 2019 · Databases

Cost‑Based MySQL Query Optimization: Concepts, Tools, and Practical Tips

This article summarizes a MySQL webinar covering cost‑based query optimization, monitoring and analysis tools, data‑access methods and index selection, join optimization techniques, and ways to influence the optimizer through hints and configuration, providing a concise technical reference for database practitioners.

Index SelectionJOIN optimizationOptimizer Hints
0 likes · 11 min read
Cost‑Based MySQL Query Optimization: Concepts, Tools, and Practical Tips
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.

Database ReplicationInnoDBPerformance Schema
0 likes · 12 min read
Using MySQL 8.0 CLONE Plugin to Create Instance Replicas
Aikesheng Open Source Community
Aikesheng Open Source Community
Jun 14, 2019 · Databases

Automatic Member Rejoin in MySQL Group Replication (MGR): Features, Configuration, and Monitoring

Starting with MySQL 8.0.16, Group Replication introduces an automatic member rejoin feature that allows expelled or disconnected nodes to attempt reconnection without manual intervention, configurable via the group_replication_autorejoin_tries variable, with monitoring via Performance Schema and trade‑offs compared to expel timeout.

Auto RejoinGroup ReplicationPerformance Schema
0 likes · 11 min read
Automatic Member Rejoin in MySQL Group Replication (MGR): Features, Configuration, and Monitoring
dbaplus Community
dbaplus Community
Jul 25, 2017 · Databases

How to Build a MySQL Connection & SQL Analyzer for Fast Issue Diagnosis

This article explains how to create a lightweight MySQL tool that extracts connection details from information_schema.processlist, groups them by user, host, database, command and state, fingerprints SQL statements, and correlates them with InnoDB transaction data to quickly pinpoint performance problems.

Connection AnalysisDatabase MonitoringIncident Diagnosis
0 likes · 12 min read
How to Build a MySQL Connection & SQL Analyzer for Fast Issue Diagnosis
dbaplus Community
dbaplus Community
Jun 19, 2017 · Databases

Unlock Full‑SQL Statistics in MySQL: Using Performance Schema with myawr

By enabling MySQL's Performance Schema and integrating its comprehensive SQL execution metrics into the open‑source myawr tool, this guide shows how to collect, store, and visualize full‑query statistics—beyond slow‑log—through table design, data ingestion, and multi‑dimensional reporting.

Performance SchemaSQL statisticsmyawr
0 likes · 11 min read
Unlock Full‑SQL Statistics in MySQL: Using Performance Schema with myawr
ITPUB
ITPUB
Mar 19, 2017 · Databases

Diagnosing and Fixing MySQL 5.7 Memory Leak in Thread/sql/slave_sql

This article walks through a real‑world MySQL 5.7 memory‑leak case, showing how to use performance_schema, pmap, and thread analysis to identify runaway threads and fix the issue by closing unclosed cursors.

Monitoring PluginPerformance SchemaReplication
0 likes · 6 min read
Diagnosing and Fixing MySQL 5.7 Memory Leak in Thread/sql/slave_sql