1.待优化sql
select * from sz_goods_wm szg
where to_days(szg.create_time) =to_days(NOW()) and szg.push_status ='N' LIMIT 10,1;
2.优化点
- 函数to_days替换成代码计算传入值,between and ,create_time添加索引
- 使用子查询
1.待优化sql
select * from sz_goods_wm szg
where to_days(szg.create_time) =to_days(NOW()) and szg.push_status ='N' LIMIT 10,1;
2.优化点