Tagged articles
6 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 PerformanceFORCE INDEX
0 likes · 4 min read
Why MySQL Optimizer Picks the Wrong Index and How to Fix It
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.

Index SelectionOptimizer_traceexplain
0 likes · 11 min read
Diagnosing and Resolving MySQL Optimizer Mis‑selection of Indexes
Tencent Qidian Tech Team
Tencent Qidian Tech Team
Nov 24, 2021 · Databases

Why MySQL Picks index_author_id Over index_title: Execution & Cost Insights

This article explains MySQL's architecture, the server and storage‑engine layers, query execution phases, status states, query cache behavior, the optimizer's parsing and planning steps, EXPLAIN output fields, the cost model, and why the optimizer selects index_author_id instead of index_title for a given query.

Cost ModelIndex SelectionStorage Engine
0 likes · 14 min read
Why MySQL Picks index_author_id Over index_title: Execution & Cost Insights
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.

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