mirror of
https://github.com/Snailclimb/JavaGuide
synced 2025-06-16 18:10:13 +08:00
Update mysql-high-performance-optimization-specification-recommendations.md
This commit is contained in:
parent
c2efa48666
commit
bca0422d4b
@ -252,10 +252,12 @@ Innodb 是按照主键索引的顺序来组织表的
|
|||||||
|
|
||||||
隐式转换会导致索引失效如:
|
隐式转换会导致索引失效如:
|
||||||
|
|
||||||
```
|
```sql
|
||||||
select name,phone from customer where id = '111';
|
select name,phone from customer where id = '111';
|
||||||
```
|
```
|
||||||
|
|
||||||
|
详细解读可以看:[MySQL中的隐式转换造成的索引失效](./index-invalidation-caused-by-implicit-conversion.md) 这篇文章。
|
||||||
|
|
||||||
### 3. 充分利用表上已经存在的索引
|
### 3. 充分利用表上已经存在的索引
|
||||||
|
|
||||||
避免使用双%号的查询条件。如:`a like '%123%'`,(如果无前置%,只有后置%,是可以用到列上的索引的)
|
避免使用双%号的查询条件。如:`a like '%123%'`,(如果无前置%,只有后置%,是可以用到列上的索引的)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user