Skip to content

Commit

Permalink
add MySQL 字符集不一致导致索引失效的一个真实案例
Browse files Browse the repository at this point in the history
  • Loading branch information
Snailclimb committed Jul 25, 2020
1 parent a39a404 commit 71c42fd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/database/MySQL高性能优化规范建议.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ Innodb 支持事务,支持行级锁,更好的恢复性,高并发下性能

兼容性更好,统一字符集可以避免由于字符集转换产生的乱码,不同的字符集进行比较前需要进行转换会造成索引失效,如果数据库中有存储 emoji 表情的需要,字符集需要采用 utf8mb4 字符集。

参考文章:[MySQL 字符集不一致导致索引失效的一个真实案例](https://blog.csdn.net/horses/article/details/107243447)

### 3. 所有表和字段都需要添加注释

使用 comment 从句添加表和列的备注,从一开始就进行数据字典的维护
Expand Down

0 comments on commit 71c42fd

Please sign in to comment.