当前位置:网站首页>Mysql数据库索引(innodb引擎)
Mysql数据库索引(innodb引擎)
2022-07-28 05:16:00 【小疯子青】
关于b+树相关概念请自行查阅,本文主要是区分非唯一索引、唯一索引、联合索引(组合索引)、覆盖索引的区别。
唯一索引引节点上是主键和指针,叶子节点存放的是完整的数据。
非唯一索引的结果也是b+树,但是叶子节点不存放具体的数据,存放的是主键值,需要到主键索引中回表查询。
组合索引是在多个字段上建立索引,相应的也会创建b+树,叶子节点存放具体的数据。复合索引(A,B,C)查询条件(A,B,C),(A),(A,B)会使用组合索引,根据其他示例显示(A,C)部分使用索引,涉及到表查询回填,具体遇到可以使用explain来分析。
覆盖索引并非创建的索引,只是一种现象的称呼,如果其他类型索引查询时没有进行回表查询,则称之为覆盖索引,可以通过explain查询查看Extra字段为Using index,例如单一索引直接命中记录就是覆盖索引。组合索引中查询如果只是基本的等于查询或者其他可以直接命中到记录的查询,是不涉及回表查询的,这种情况也是覆盖索引。
边栏推荐
- From the basic concept of micro services to core components - explain and analyze through an example
- Gan: generative advantageous nets -- paper analysis and the mathematical concepts behind it
- Professor dongjunyu made a report on the academic activities of "Tongxin sticks to the study of war and epidemic"
- 【ARXIV2203】CMX: Cross-Modal Fusion for RGB-X Semantic Segmentation with Transformers
- I've been in an outsourcing company for two years, and I feel like I'm going to die
- Configuration experiment of building virtual private network based on MPLS
- How to send and receive reports through outlook in FastReport VCL?
- Data security is gradually implemented, and we must pay close attention to the source of leakage
- 数据库日期类型全部为0
- [high CPU consumption] software_ reporter_ tool.exe
猜你喜欢

Flink mind map

The most detailed installation of windows10 virtual machine, install virtual machine by hand, and solve the problem that the Hyper-V option cannot be found in the home version window
![[high CPU consumption] software_ reporter_ tool.exe](/img/3f/2c1ecff0a81ead0448e1215567ede7.png)
[high CPU consumption] software_ reporter_ tool.exe

【ARXIV2203】CMX: Cross-Modal Fusion for RGB-X Semantic Segmentation with Transformers

ES6 new variable modifiers let and const, new basic data type symbol

Test Development - UI testing in automated testing

【内功心法】——函数栈帧的创建和销毁(C实现)

mysql的日期与时间函数,varchar与date相互转换

7.<tag-字符串和API的取舍>补充: 剑指 Offer 05. 替换空格

【ARXIV2204】Simple Baselines for Image Restoration
随机推荐
【ARXIV2205】Inception Transformer
Clickhouse pit filling note 2: the join condition does not support non equal judgments such as greater than and less than
RT based_ Distributed wireless temperature monitoring system based on thread
How to successfully test php7.1 connecting to sqlserver2008r2
21 day SQL punch in summary
Pipe /createpipe
MySQL 默认隔离级别是RR,为什么阿里等大厂会改成RC?
Making RPM packages with nfpm
Data imbalance: comprehensive sampling of anti fraud model (data imbalance)
Eccv2022 | 29 papers of Tencent Youtu were selected, including face security, image segmentation, target detection and other research directions
CPU and memory usage are too high. How to modify RTSP round robin detection parameters to reduce server consumption?
Visual studio 2019 new OpenGL project does not need to reconfigure the environment
Read the paper -- a CNN RNN framework for clip yield prediction
HDU 2586 How far away ? (LCA multiplication method)
【计算机三级信息安全】信息安全保障概述
FreeRTOS learning (I)
数据库日期类型全部为0
Confused, I'm going to start running in the direction of [test]
Share several methods of managing flag bits in C program
The research group passed the thesis defense successfully