mysql between and 实测索引时效问题

 数据量 大概 10W

explain select count(*) from predictions where predictions.deleted_at is null and (in_time between '2022-09-01' and '2022-09-13')

上面的走索引 大概3000

explain select count(*) from predictions where predictions.deleted_at is null and (in_time between '2022-09-01' and '2022-09-13')
上面的不走索引 大概4000


比较神奇


posted @ 2022-09-24 10:44  天梯小蔡  阅读(523)  评论(0编辑  收藏  举报