查询计划Explain


mysql查询过程中,如若想了解当前sql的执行计划,可以通过explain your_sql的方式查看,具体可以参考mysql官方解释:https://dev.mysql.com/doc/refman/5.5/en/explain-output.html

mysql query ref的效率

结果值从好到坏依次是:

system > const > eq_ref > ref > fulltext > ref_or_null > index_merge > unique_subquery > index_subquery > range > index > ALL

一般来说,得保证查询至少达到range级别,最好能达到ref,否则就可能会出现性能问题。

mysql索引建立原则 

mysql 索引、查询优化

 

相关文章:

  • 2021-06-16
  • 2021-07-04
  • 2022-12-23
  • 2021-11-24
  • 2021-10-13
  • 2021-11-14
  • 2021-08-12
  • 2021-09-30
猜你喜欢
  • 2021-11-16
  • 2022-12-23
  • 2021-07-06
  • 2021-06-17
  • 2021-08-28
  • 2021-05-29
相关资源
相似解决方案