在数据库表中有索引
INDEX `time` (`timestamp`)
而使用sql查询索引却不起作用
select * from students where time>="2019-01-28 12:12:12"
则使用
select * from students force index(time) where time>="2019-01-28 12:12:12"
在数据库表中有索引
INDEX `time` (`timestamp`)
而使用sql查询索引却不起作用
select * from students where time>="2019-01-28 12:12:12"
则使用
select * from students force index(time) where time>="2019-01-28 12:12:12"