Tagged articles

Index Selection

7 articles · Page 1 of 1
Senior Tony
Senior Tony
Mar 26, 2026 · Databases

Why MySQL Optimizer Picks the Wrong Index and How to Fix It

The MySQL optimizer can select an inappropriate index due to inaccurate statistics or sampling errors, but you can correct this by refreshing statistics with ANALYZE TABLE, increasing sample pages, or explicitly forcing the right index using the FORCE INDEX hint.

ANALYZE TABLEDatabase PerformanceIndex Selection
0 likes · 4 min read
Why MySQL Optimizer Picks the Wrong Index and How to Fix It
Senior Xiao Ying
Senior Xiao Ying
Feb 14, 2026 · Databases

Deep Dive into MySQL Query Optimizer: From Writing SQL to Controlling Performance

This article explains MySQL’s query execution pipeline—from parsing to the storage engine—details the cost‑based optimizer’s model, shows how it evaluates index choices versus full‑table scans, demonstrates using optimizer hints and FORCE INDEX, and provides monitoring commands and best‑practice recommendations for effective query tuning.

Cost-Based OptimizationIndex SelectionMySQL
0 likes · 9 min read
Deep Dive into MySQL Query Optimizer: From Writing SQL to Controlling Performance
Zhuanzhuan Tech
Zhuanzhuan Tech
Mar 6, 2024 · Databases

Diagnosing and Resolving MySQL Optimizer Mis‑selection of Indexes

This article recounts a real‑world incident where MySQL 5.7 chose a sub‑optimal index, causing a three‑second slow query, and explains how the team identified the root cause, used EXPLAIN and optimizer trace, and applied fixes such as forced index hints and data cleanup.

EXPLAINIndex SelectionMySQL
0 likes · 11 min read
Diagnosing and Resolving MySQL Optimizer Mis‑selection of Indexes
dbaplus Community
dbaplus Community
Aug 19, 2020 · Databases

Why MySQL Chose the Wrong Index and How to Fix It

A production MySQL query that should have returned instantly took 44 seconds because the optimizer selected the primary key index instead of a suitable composite index, and the article explains the root cause, the optimizer's decision process, and multiple practical solutions to prevent such slow‑query incidents.

EXPLAINIndex SelectionMySQL
0 likes · 15 min read
Why MySQL Chose the Wrong Index and How to Fix It
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 SelectionMySQLOptimizer Hints
0 likes · 11 min read
Cost‑Based MySQL Query Optimization: Concepts, Tools, and Practical Tips