当前位置:网站首页>[notes] like the solution to the problem of slow query (index + explicitly specifying query fields)
[notes] like the solution to the problem of slow query (index + explicitly specifying query fields)
2022-06-13 08:21:00 【SDL Dahua】
Preface
I feel this knowledge point is very important during the test today , And the probability of using it is quite high .
Important note :
like The double hundredth fuzzy matching of can use the index , But only if the target field has an index , also select The field name must be explicitly specified later .
//like The problem of slow query is solved ( Index required + Specify query fields explicitly )
// When there's too much data ,like It's going to be inefficient , Because it is a full table scan , No index
// Solution
1、 Add an index to the field
2、 Specify query fields explicitly
MySQL edition
mysql8.0
legend ( Specify fields explicitly ):

legend ( No field specified ):

Be careful :select Field name must be specified later , Otherwise, the index cannot be used !
END
边栏推荐
猜你喜欢

MySQL queries difference sets (missing data) by linking tables based on an associated field

有什么好的管理软件来解决茶叶批发商面临的难题

【博弈论-完全信息静态博弈】 Nash均衡的应用

MySQL sorts according to the specified order of the specified fields

Cosmos star application case

ERP基础数据 华夏

File upload question type

HCIP_ MGRE comprehensive experiment

Give code vitality -- the way to read code neatly

本地靶场2-文件上传漏洞(三)-网络安全
随机推荐
6. fabric2.2 stop clustering and delete data (use the official demo)
Dfinity (ICP) deployment and development-2
How can the small and medium-sized lighting industry make use of the digital transformation to stand out from the encirclement?
CCNP_ Bt- Reissue
Rust writes near smart contract
Mysql_ Preliminary summary of database data (Continued)
Is there any good management software to solve the problems faced by tea wholesalers
Microservice project construction III: automatic code generation
Overview of cross chain protocol IBC
Practice makes sense -- your byte alignment and stack cognition may be wrong
Determine whether a string is rotated from another string
[game theory complete information static game] Nash equilibrium
Wechat upload picture material interface
Which is the stronger fresh food distribution and sorting management system?
Notes on MySQL transaction not automatically submitting
Why do wholesalers use the order system
SQL injection experiment
Founder of Starbucks: no longer open "public toilets" to non store consumers for safety reasons
Guidance process and service control
直播回顾 | 积极防御体系下BAS技术创新探索