1
0
mirror of https://github.com/Snailclimb/JavaGuide synced 2025-06-20 22:17:09 +08:00

fix:少写了一个字

This commit is contained in:
SnailClimb 2018-10-31 15:03:20 +08:00 committed by GitHub
parent c3ed2d736b
commit 394a5ede03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -60,7 +60,7 @@ MySQL中的索引可以以一定顺序引用多列这种索引叫作联合索
```
select * from user where name=xx and city=xx ; //可以命中索引
select * from user where name=xx ; // 可以命中索引
select * from user where city=xx; // 法命中索引
select * from user where city=xx; // 法命中索引
```
这里需要注意的是,查询的时候如果两个条件都用上了,但是顺序不同,如 `city= xx and name xx`,那么现在的查询引擎会自动优化为匹配联合索引的顺序,这样是能够命中索引的.