Mysql强制使用索引:force index(索引名或者主键PRI)
例如:
-- 强制使用主键
select * from '表名' force index(PRI) ;
-- 强制使用索引 如下,其中,xxx 为索引名
select * from '表名' force index(xxx) ;
Mysql强制使用索引:force index(索引名或者主键PRI)
例如:
-- 强制使用主键
select * from '表名' force index(PRI) ;
-- 强制使用索引 如下,其中,xxx 为索引名
select * from '表名' force index(xxx) ;