索引使用函数计算案例优化 索引使用函数计算 案例 功能:7月份数据统计,t_modified字段上加了索引select count(*) from tradelog where month(t_modified)=7;由于使用到了函数,虽然用到了索引,但是全索引扫描 优化select count(*) from tradelog where where t_modified >= ‘2016-7-1’ and t_modified <= ‘2016-7-31’ 使用到索引快速定位能力