[英]full table scan in mysql
select *from REPT_AIR_PRY_HY1 RAP where (RAP.DATE_OF_ISSUE) BETWEEN "2017-10-01" AND DATE_ADD("2017-10-31", INTERVAL 1 DAY)
the explain plan of this query gives me 337243 but data s between these dates is only 55209 and there is even index is created on column DATE_OF_ISSUE .这个查询的解释计划给了我337243但这些日期之间的数据只有55209并且甚至在列 DATE_OF_ISSUE 上创建了索引。 So, why it is scanning the whole table?
那么,为什么要扫描整个表呢? thanks in advance
提前致谢
Some possibilities:一些可能性:
ANALYZE TABLE
.ANALYZE TABLE
。 To discuss further, please provide SHOW CREATE TABLE
.要进一步讨论,请提供
SHOW CREATE TABLE
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.