EXPLAIN SELECT * from test2 WHERE customer_id=1 and content>'a' ORDER BY customer_id ,content
customer_id和content都是索引列,分开的为什么这种情况下还会出现using filesort呢? where里面的字段不是已经包含了orderby字段吗?谢谢
customer_id和content都是索引列,分开的为什么这种情况下还会出现using filesort呢? where里面的字段不是已经包含了orderby字段吗?谢谢
customer_id和content
用联合索引改用=后,因为是customer_id 和 content =配对,实际上都是使用了两个索引。