MySQL index hints usage
Index hints can artificially tell the mysql optimizer how to complete select, such as forcing certain index (s) to go or ignoring certain index (s).
The specified index must have an index name.
Officially provided basic grammar:
index_hint:
USE {INDEX|KEY}
[FOR {JOIN|ORDER BY|GROUP BY}] ([index_list])
| IGNORE {INDEX|KEY}
[FOR {JOIN|ORDER BY|GROUP BY}] (index_list)
| FORCE {INDEX|KEY}
[FOR {JOIN|ORDER BY|GROUP BY}] (index_list)
where index_list is the index name.
Test table:
Author Weixin Official Accounts (continuously updated)