这个查询需要一个小时
select *,
unix_timestamp(finishtime)-unix_timestamp(submittime) timetaken
from joblog
where jobname like '%cas%'
and submittime>='2013-01-01 00:00:00'
and submittime<='2013-01-10 00:00:00'
order by id desc limit 300;
但同一个查询submittime
在 0.03 秒内完成
该表有 210 万行
任何想法是什么导致了问题或如何调试它