如果我们创建了(area, age,salary)的复合索引,那么其实相当于创建了:(area,age,salary),(area,age).(area)三个索引,这被称为最佳左前缀特性.因此我们在创建复合索引时应该将最常用作限制条件的列放在最左边,依次递减.例:select * from test where area='11' select * from test where area='11' and age=1 select * from test where area='11' and…