⑦. 联合索引的设定
- ①. 设置联合索引
key ‘idx_name_age_position’ (‘name’,‘age’,‘position’) USING BTREE
②. 下面的只有第一条使用的索引
explain select * from employee where name='TANGZHI' and age=31; explain select * from employee where age=30 and position='dev'; explain select * from employee where position='dev';