下面这个 sql 语句
SELECT *
FROM table
WHERE code = 'x83'
AND start_time <= now()
AND end_time >= now()
ORDER BY `priority`, `created_at`
优化的话,是不是要建一个索引(code, priority, created_at) 中间的 start_time 和 end_time 怎么办?
另外只针对 order by 建立索引( priority, created_at )会生效吗?