MySQL explain filtered column jumping 4,100 with index

混江龙づ霸主 提交于 2019-12-04 06:04:42

Hey, it's actually good news. It shows how many rows your limitations are removing from the result set. In this case, that would be your LIMIT statement. See the manual:

The filtered column indicates an estimated percentage of table rows that will be filtered by the table condition. That is, rows shows the estimated number of rows examined and rows × filtered / 100 shows the number of rows that will be joined with previous tables. This column is displayed if you use EXPLAIN EXTENDED.

From the docs:

filtered

The filtered column indicates an estimated percentage of table rows that will be filtered by the table condition. That is, rows shows the estimated number of rows examined and rows × filtered / 100 shows the number of rows that will be joined with previous tables. This column is displayed if you use EXPLAIN EXTENDED. (New in MySQL 5.1.12)

Basically, it's ratio of records returned to records fetched.

Its goal is to show how selective your WHERE / ON conditions are and what would be the benefit of creating an index on them.

Note that this field has little sense for the queries with LIMIT, since it's always calculated without regard to the LIMIT clause, which rows is calculated with regard to the latter.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!