force index(idx_name)或者

use index(idx_name)

注意该语句的位置,都是在from 第一个表明的后边

e.g. 1 无join

select * 
from table_a
force index(idx_name)
where ......

e.g. 2 有jion

select *
from table_a 
force index(idx_name)
left join table_b
where ......

相关文章:

  • 2021-12-22
  • 2021-12-31
  • 2022-12-23
  • 2022-02-20
  • 2022-02-09
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-02-10
  • 2022-02-01
  • 2022-12-23
  • 2021-11-24
  • 2021-11-23
  • 2022-12-23
  • 2022-02-22
相关资源
相似解决方案