Tagged articles
force index
10 articles · Page 1 of 1

ITPUBJun 22, 2026 · Databases
The article explains how an UPDATE without an indexed WHERE clause triggers InnoDB’s next‑key locks, effectively locking the entire table, shows transaction examples that cause blocking, and recommends enabling sql_safe_updates or using FORCE INDEX to ensure the statement uses an index scan.
InnoDBMySQLUpdate
0 likes · 8 min read

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

This article explains how MySQL's implicit type conversion during table joins can render indexes unusable or alter join order, and provides practical solutions such as aligning column types, using optimizer hints, and forcing indexes to restore query performance.
MySQLOptimizer Hintsforce index
0 likes · 6 min read

The article explains why executing a full‑table UPDATE on large MySQL tables using row‑based binlog can overload replication, discusses the inefficiencies of deep pagination and IN clauses, and presents a batch‑processing strategy that leverages SQL_NO_CACHE and FORCE INDEX to safely and efficiently migrate data.
Full Table UpdateMySQLSQL_NO_CACHE
0 likes · 8 min read

This article explains why a simple full‑table UPDATE on massive MySQL tables can cripple master‑slave replication, analyzes deep‑pagination inefficiencies, and presents a step‑by‑step batch‑update strategy using NO_CACHE and FORCE INDEX to keep binlog size and buffer‑pool impact under control.
Deep PaginationFull Table UpdateMySQL
0 likes · 9 min read

This article examines a MySQL slow‑query incident caused by the optimizer using the primary clustered index instead of an appropriate secondary index, explains the underlying index structures, and presents solutions such as FORCE INDEX and migrating complex queries to Elasticsearch for long‑term performance improvement.
ElasticsearchIndex Optimizationdatabase
0 likes · 9 min read

This article walks through a real‑world MySQL slow‑query case, detailing analysis, index checks, character‑set alignment, forced index usage, and IN‑clause considerations that together reduced a 5‑second query to under one second.
IN ClauseIndex OptimizationMySQL
0 likes · 4 min read

A MySQL 5.6+ optimizer bug causes queries that filter by uid and order by id with a small LIMIT to use a costly full table scan instead of the appropriate idx_uid_stat index, and the article explains the root cause, shows optimizer_trace output, and offers two practical work‑arounds.
MySQLORDER BYOptimizer
0 likes · 8 min read

A careless UPDATE without an indexed WHERE clause can trigger full‑table locking in InnoDB, halting business operations, but by understanding InnoDB's next‑key locks, enabling sql_safe_updates, and using FORCE INDEX you can avoid this costly mistake.
InnoDBMySQLUpdate
0 likes · 8 min read

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
