Skip to content

Commit 394a5ed

Browse files
authored
fix:少写了一个字
1 parent c3ed2d7 commit 394a5ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

数据存储/MySQL Index.md

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

@@ -109,4 +109,4 @@ ALTER TABLE `table_name` ADD INDEX index_name ( `column1`, `column2`, `column3`
109109
- 《Java工程师修炼之道》
110110
- 《MySQL高性能书籍_第3版》
111111
- https://juejin.im/post/5b55b842f265da0f9e589e79
112-
112+

0 commit comments

Comments
 (0)