0
我有上有3个索引列的表让萨耶col1, col2, col3
他们都诠释索引的搜索速度更快吗?
听朋友说,如果COLUMN2有数据的真实性少(我的意思是它只有12,13,14和其他列有像随机数字),首先将条件放在该列的WHERE
子句上会更快,因为mysql将首先从该点获取数据。
所以基本上,他说,第二个是快
select * from my_table where col1=1 and col2=2 and col3=3
select * from my_table where col2=2 and col1=1 and col3=3
是真的吗?我找不到关于这个主题的任何阅读材料。
http://dev.mysql.com/doc/refman/5.5/en/optimization-indexes.html – cristian