当前位置:网站首页>When will the index fail
When will the index fail
2022-06-12 19:50:00 【WD Technology】
1、 If there is... In the condition or, Even if there is a conditional index, it will not be used ( That's why we try to use as little or Why )
Be careful : Want to use or, And want the index to work , Can only be or Each column in the condition is indexed
2、 For multi-column indexes , Not the first part of use , Index will not be used
3、like The query is based on % start 
4、 If the column type is string , Be sure to quote the data in the condition , Otherwise, the index is not used 
5、 Column to column contrast
In some table , Two columns a,b Are individually indexed , The following query conditions will not be indexed
select * from test where a = b
6、 There are calculations on the index column
select * from test where upper(name)='SUNYANG';
This is not going to be indexed , Because the query criteria are indexed
When the query condition does not have an index , You can still use the index
select * from test where name=upper('sunyang');
--INDEX RANGE SCAN
7、 Predicate operations
select * from table where id/2 = type_id
8、 Index can be used for range lookup , But behind the scope Condition will invalidate the index
边栏推荐
- 简单理解防抖函数
- Reading small program based on wechat e-book graduation design (4) opening report
- What are meta-inf and WEB-INF respectively?
- Efcore tuning
- API call display, detailed API of Taobao, tmall and pinduoduo commodity pages, and return of APP side original data parameters
- 2022年最新宁夏建筑安全员模拟题库及答案
- 合理地配置线程池
- 【GAMES101】课堂笔记8–着色(着色频率、图形管线、纹理映射)
- Shell programming regular expressions and metacharacters
- Equipment management - borrowing and returning module 1
猜你喜欢

什么是数据驱动

The component style set by uniapp takes effect in H5 and app, but does not take effect in wechat applet. The problem is solved

测试必备:推荐一款跨平台App性能专项测试工具!

Since using low code development, the development efficiency has been increased by 10 times

How to close icloud when Apple ID of Apple mobile phone forgets password and frequently jumps out to log in

Download and configuration of nuitka packaging tutorial

IO流基础知识详解--文件及IO流原理

Demand and business model innovation-5-process

Experience Technology Department of ant group launched the 2023rd school recruitment

5g R17 standard is frozen. What does it say?
随机推荐
Wechat e-book reading applet graduation design work (6) opening defense ppt
How to make a computer installation and startup USB flash disk
华尔街备忘单(Wall Street Cheat Sheet)
How to close icloud when Apple ID of Apple mobile phone forgets password and frequently jumps out to log in
The execution results of i+=2 and i++ i++ under synchronized are different
MySQL index classification
torch 网络模型转换onnx格式,并可视化
Blue Bridge Cup basic-14 VIP question time conversion
MySQL log
【生成对抗网络学习 其三】BiGAN论文阅读笔记及其原理理解
Axure RP 9 for MAC (interactive product prototyping tool) Chinese version
system()
【刷题笔记】线段树
Demand and business model innovation-4-strategy
【GAMES101】课堂笔记8–着色(着色频率、图形管线、纹理映射)
User and group permissions
4 R basic exercises
Microsoft Word 教程,如何在 Word 中插入页码、目录?
What did 3GPP ran do in the first F2F meeting?
JDBC接口总结