请教where and order by语句与索引
okgef 2016-04-01 07:29:33 select * from 表 where uid=? and cid=? order by id desc limit ? ?;
其中id,uid,cid都是int类型,ID为主键,其他两个为key
十万数据测试,每页各5行,两千多面点到尾页也很快
然而在explain 的时候,却Extra:Using where; Using filesort
type: ref, ref: const,const
请教是应该如何优化查询语句还是索引?