如表查询
字段顺序是
id,name,sex,addr
查询条件字段顺序不变,但可以选择如
select id,name,sex,addr from student where id like 'aa%' and name like 'bb%'
或者
select id,name,sex,addr from student where sex like 'a%' and addr like 'dd%'
如何可以优化查询
字段顺序是
id,name,sex,addr
查询条件字段顺序不变,但可以选择如
select id,name,sex,addr from student where id like 'aa%' and name like 'bb%'
或者
select id,name,sex,addr from student where sex like 'a%' and addr like 'dd%'
如何可以优化查询
索引慢
单独查其他列 不使用索引在建个name的单列索引试试
楼主这个应该分别建单例索引,然后4个字段的复合索引给order by用
怎样实现啊?