Explain MySQL explain execution plan maths, difference between two plans

前端 未结 2 1837
-上瘾入骨i
-上瘾入骨i 2021-02-14 11:49

I\'ve got a basic MySQL performance question related to explain. I have two queries that return the same result and I am trying to understand how to make sense of the EXPL

2条回答
  •  情话喂你
    2021-02-14 12:07

    Don't put too much trust in the "rows" Statement of EXPLAIN. As in the mysql docs: "Estimate of rows to be examined" (http://dev.mysql.com/doc/refman/5.1/en/explain-output.html).

    Perhaps updating your index statistics will give you a better estimate (OPTIMIZE TABLE, http://dev.mysql.com/doc/refman/5.0/en/optimize-table.html)

提交回复
热议问题