Py学习  »  DATABASE

mysql会根据多列索引顺序重新排序where条件吗?

guo • 5 年前 • 1408 次点击  

例如,索引是 (column1,column2) . 假设我们运行一个查询 select * from some_table where column2 > 3 and column1<2 ,mysql是否足够聪明,可以将查询重新排序为 select * from some_table where column1<2 and column2 > 3 然后使用索引 (第1栏,第2栏) ?

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/40712
 
1408 次点击  
文章 [ 1 ]  |  最新文章 5 年前