mysql 组合in查询优化,走索引写法

多个使用or拼接。

EXPLAIN SELECT rs.id id, rs.operatortime operatortime, rs.asnno asnno, rs.source source, rs.asnstatus asnstatus from tb_receipt_status rs 
where (asnno,source,asnstatus) in (('11111','FLWMS','22')) or (asnno,source,asnstatus) in (('22222','FLWMS','11'));

 1SIMPLErsrangeunique_keyunique_key3452Using index condition

猜你喜欢

转载自wddpwzzhao123.iteye.com/blog/2307455