当前位置:网站首页>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,例如单一索引直接命中记录就是覆盖索引。组合索引中查询如果只是基本的等于查询或者其他可以直接命中到记录的查询,是不涉及回表查询的,这种情况也是覆盖索引。
边栏推荐
- Handling of web page image loading errors
- Melt cloud x chat, create a "stress free social" habitat with sound
- Applet import project
- Anaconda common instructions
- MySQL date and time function, varchar and date are mutually converted
- New methods and features of ES6 built-in objects
- HDU 3078 network (lca+ sort)
- About MySQL group_ What concat has to say
- Interpretation of afnetworking4.0 request principle
- Data imbalance: comprehensive sampling of anti fraud model (data imbalance)
猜你喜欢

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

Driving the powerful functions of EVM and xcm, how subwallet enables Boca and moonbeam

The research group passed the thesis defense successfully

Read the paper -- a CNN RNN framework for clip yield prediction
![[paper notes] - low illumination image enhancement - zeroshot - rrdnet Network - 2020-icme](/img/e3/f9c6bfdbcd5dffd406e3f1d2331050.png)
[paper notes] - low illumination image enhancement - zeroshot - rrdnet Network - 2020-icme

SSLError

Professor dongjunyu made a report on the academic activities of "Tongxin sticks to the study of war and epidemic"

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

Reading notes of SMT practical guide 1

First acquaintance with C language (1)
随机推荐
C language characters and strings
list indices must be integers or slices, not tuple
Keil Chinese garbled code solution
Interpreting the source code of cfrunloopref
HDU 2874 connections between cities
多御安全浏览器将改进安全模式,让用户浏览更安全
Scope, execution process and life cycle of bean
FreeRTOS个人笔记-任务通知
HDU 1522 marriage is stable
I interviewed a 38 year old programmer and refused to work overtime
[slam] lvi-sam analysis - Overview
11.< tag-动态规划和子序列, 子数组>lt.115. 不同的子序列 + lt. 583. 两个字符串的删除操作 dbc
MySQL date and time function, varchar and date are mutually converted
MySQL 默认隔离级别是RR,为什么阿里等大厂会改成RC?
From the basic concept of micro services to core components - explain and analyze through an example
Read the paper -- a CNN RNN framework for clip yield prediction
Check box error
Using RAC to realize the sending logic of verification code
【ARXIV2205】Inception Transformer
【SLAM】LVI-SAM解析——综述