当前位置:网站首页>The explain statement in MySQL queries whether SQL is indexed, and several types in extra collate and summarize
The explain statement in MySQL queries whether SQL is indexed, and several types in extra collate and summarize
2022-06-29 20:14:00 【Game programming】
1.using index Find through the secondary common index , Implement overlay index , There is no need to query the table
2.using index condition Find through the secondary common index , After the results found through the index, there are where filter , And this filtering can be realized only by using the secondary ordinary index , No judgment filtering in memory . But you need to query the required field values back to the table .
3.using where Whether or not it is found through the index , As long as the data is loaded into memory where Condition screening , All are
4.using index & using where: Search uses index , But all the data needed can be found in the index column , So you don't need to go back to the table to query the data
Practical example
If there is a watch xxx, to modify_date Index
1.using index Find through the secondary common index , Implement overlay index , There is no need to query the table
explainSELECT modify_date from xxx
2.using index condition Find through the secondary common index , We need to go back to the table
explainSELECT * from xxx where modify_date > "2022-06-27 10:27:07" and modify_date < "2022-06-28 0:0:0"
3.using where Search without index
explainSELECT * from xxx where create_date > "2022-06-27 10:27:07" and create_date < "2022-06-28 0:0:0"
4.using index & using where: Search uses index , But all the data needed can be found in the index column , So you don't need to go back to the table to query the data
explainSELECT modify_date from xxx where modify_date > "2022-06-27 10:27:07" and modify_date < "2022-06-28 0:0:0"Return results

author :Koikoi123
Game programming , A game development favorite ~
If the picture is not displayed for a long time , Please use Chrome Kernel browser .
边栏推荐
猜你喜欢

【Try to Hack】vulnhub narak

Etcd database source code analysis - put process of server

Fastadmin background setting radio button

Three.js开发:粗线的画法

Linux安装MySQL5

文件包含漏洞

.NetCore统一认证授权学习——Run(1)

一次 Keepalived 高可用的事故,让我重学了一遍它!

ASP. Net core creates razor page and uploads multiple files (buffer mode) (Continued)

Understanding of software test logic coverage
随机推荐
偶然发现了另一种跨域方式,不知道有没有人这么玩过
Fastadmin background setting radio button
ASP.Net Core创建Razor页面上传多个文件(缓冲方式)(续)
Flume理论
2022年深圳市福田区支持招商引资若干政策
Chapter II (physical layer)
freemarker模板框架生成图片
攻防演练中的防守基石——全方位监控
Golang基础学习
Dynamics CRM: 本地部署的服务器中, Sandbox, Unzip, VSS, Asynchronous还有Monitor服务的作用
Sword finger offer 59 - ii Maximum value of the queue
Three.js开发:粗线的画法
深入Go底层原理,重写Redis中间件实战无密
thinkphp5中的配置如何使用
Flume theory
社区访谈丨一个IT新人眼中的JumpServer开源堡垒机
[USB flash disk test] in order to transfer the data at the bottom of the pressure box, I bought a 2T USB flash disk, and the test result is only 47g~
Nutch2.1在Windows平台上使用Eclipse debug 存储在MySQL的搭建过程
【Try to Hack】vulnhub narak
2021 CCPC 哈尔滨 E. Power and Modulo (思维题)