Files
Hui-s-notebook/logseq-java/pages/MySQL索引失效.md
2024-02-02 00:12:49 +08:00

8 lines
317 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
- 含有计算以及函数的情况
- like以%和_开头匹配的情况
- 不等于
- is null和is not null
- 如果有字段为null尽量使用is null判断如果null比较高优化器也会使用索引进行范围查询
- 存在类型转换
- 复合索引不满足最左前缀
- mysql认为全表扫描快