mysql建索引最好在整数字段上,效果较明显

===>1.select * from goods where is_delete=0 and status=1 and (name like '%%' or intro like '%%')

2.如果在is_delete 和status上建索引 ,速度差距至少有几十倍

3.索引建在整数上比char  varchar上快

4.关联查询时,最好关联的字段类型都是一样,最好是int,因为为varchar时需要设计类型转换,也需要消耗io 

     记:一次做搜索查询