惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
The GitHub Blog
The GitHub Blog
T
Threatpost
人人都是产品经理
人人都是产品经理
大猫的无限游戏
大猫的无限游戏
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
博客园 - Franky
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Apple Machine Learning Research
Apple Machine Learning Research
酷 壳 – CoolShell
酷 壳 – CoolShell
M
MIT News - Artificial intelligence
小众软件
小众软件
Hugging Face - Blog
Hugging Face - Blog
云风的 BLOG
云风的 BLOG
S
Security Affairs
P
Proofpoint News Feed
L
LINUX DO - 最新话题
宝玉的分享
宝玉的分享
S
Security @ Cisco Blogs
H
Hacker News: Front Page
Security Archives - TechRepublic
Security Archives - TechRepublic
Vercel News
Vercel News
Engineering at Meta
Engineering at Meta
Know Your Adversary
Know Your Adversary
Y
Y Combinator Blog
美团技术团队
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
月光博客
月光博客
量子位
博客园_首页
The Last Watchdog
The Last Watchdog
D
DataBreaches.Net
www.infosecurity-magazine.com
www.infosecurity-magazine.com
P
Privacy International News Feed
The Register - Security
The Register - Security
Schneier on Security
Schneier on Security
H
Help Net Security
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
V
Visual Studio Blog
Google DeepMind News
Google DeepMind News
F
Full Disclosure
C
Cyber Attacks, Cyber Crime and Cyber Security
MyScale Blog
MyScale Blog
aimingoo的专栏
aimingoo的专栏
S
Schneier on Security
L
Lohrmann on Cybersecurity
S
Secure Thoughts
Stack Overflow Blog
Stack Overflow Blog
Cloudbric
Cloudbric
Microsoft Security Blog
Microsoft Security Blog

博客园 - 马会东

Llama3 在HumanEval中的表现 在 Apple Silicon Mac(M1、M2 或 M3)上运行最新 LLM 模型 Meta Llama 3 的分步指南 mamp nginx thinkphp5 配置方法 centos8 yum 安装rabbitmq dotnet new 命令 ACE Editor(代码编辑器) 入门教程 在mac上使用docker部署Mongo数据库 如何在Curl中使用Socks5代理 知识付费平台 快速开发框架(管理系统-持续更新) mysql 索引优化原则总结(limit where in like ) MySQL高级知识——Order By关键字优化 解决MySQL使用limit偏移量较大效率慢的问题 tar命令详解 systemctl命令列出所有服务 Git的撤销、修改和回退命令 使用git时显示untracked files(未监控)解决办法 MySQL中Case When用法详解 计算机指令-流水线和吞吐率
mysql索引的排列顺序
马会东 · 2022-11-19 · via 博客园 - 马会东

索引的排序是按照定义索引的顺序来的

索引的顺序要遵循三个规则
要遵循最左前缀 无论是多个还是一个列的索引 都不应该跳过最左列 如果在查询语句当中 没有使用最左前缀的字段 就不会使用索引

index_key1_key2_key3 是我们的索引
即使使用select key_2 ,key_3 from table where 。。。
越过了最左前缀 是不会使用到索引index_key1_key2_key3的
不能跨越索引列

index_key1_key2_key3 不能使用key1 key3字段 如果key2不在sql当中出现那么也不会使用到创建的索引 key1 key2出现可以使用索引
索引进行模糊查询 范围查询 ,右边的所有列都无法使用索引优化

key1=’’ and key2 like ‘%j’ and key_3=’’
可以使用我们创建的index_key1_key2_key3索引 但那时key_3是不会被优化的
————————————————
版权声明:本文为CSDN博主「多学就会融会贯通」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/ss123mlk/article/details/112662815