当前位置:网站首页>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,例如单一索引直接命中记录就是覆盖索引。组合索引中查询如果只是基本的等于查询或者其他可以直接命中到记录的查询,是不涉及回表查询的,这种情况也是覆盖索引。
边栏推荐
- About MySQL group_ What concat has to say
- RT based_ Distributed wireless temperature monitoring system based on thread
- Database date types are all 0
- Eccv2022 | 29 papers of Tencent Youtu were selected, including face security, image segmentation, target detection and other research directions
- 面试了一位38岁程序员,听说要加班就拒绝了
- Non functional test
- 使用nfpm制作rpm包
- 【ARXIV2205】Inception Transformer
- Why is MD5 irreversible, but it may also be decrypted by MD5 free decryption website
- Using RAC to realize the sending logic of verification code
猜你喜欢

Read the paper -- a CNN RNN framework for clip yield prediction

基于MPLS构建虚拟专网的配置实验

JMeter related knowledge sorting

HashSet add

Data security is gradually implemented, and we must pay close attention to the source of leakage

Struct模块到底有多实用?一个知识点立马学习

MySQL(5)

测试开发---自动化测试中的UI测试

Win10 machine learning environment construction pycharm, anaconda, pytorch

【ARXIV2205】EdgeViTs: Competing Light-weight CNNs on Mobile Devices with Vision Transformers
随机推荐
Anaconda common instructions
Driving the powerful functions of EVM and xcm, how subwallet enables Boca and moonbeam
regular expression
I interviewed a 38 year old programmer and refused to work overtime
Paper reading notes -- crop yield prediction using deep neural networks
HDU 1914 the stable marriage problem
[internal mental skill] - creation and destruction of function stack frame (C implementation)
MySQL basic query
【CVPR2022】Multi-Scale High-Resolution Vision Transformer for Semantic Segmentation
list indices must be integers or slices, not tuple
The solution after the samesite by default cookies of Chrome browser 91 version are removed, and the solution that cross domain post requests in chrome cannot carry cookies
FreeRTOS learning (I)
Tips for using swiper (1)
How to analyze fans' interests?
Dell remote control card uses ipmitools to set IPMI
Activation functions sigmoid, tanh, relu in convolutional neural networks
Flink mind map
Reading notes of SMT practical guide 1
【内功心法】——函数栈帧的创建和销毁(C实现)
Database date types are all 0