当前位置:网站首页>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,例如单一索引直接命中记录就是覆盖索引。组合索引中查询如果只是基本的等于查询或者其他可以直接命中到记录的查询,是不涉及回表查询的,这种情况也是覆盖索引。
边栏推荐
- PC端-bug记录
- 【CVPR2022】Lite Vision Transformer with Enhanced Self-Attention
- 【计算机三级信息安全】信息安全保障概述
- 11.< tag-动态规划和子序列, 子数组>lt.115. 不同的子序列 + lt. 583. 两个字符串的删除操作 dbc
- Scope, execution process and life cycle of bean
- regular expression
- 【ARIXV2204】Neighborhood attention transformer
- Have you ever seen this kind of dynamic programming -- the stock problem of state machine dynamic programming (Part 2)
- How practical is the struct module? Learn a knowledge point immediately
- RT based_ Distributed wireless temperature monitoring system of thread (I)
猜你喜欢

After ruoyi generates the code corresponding to the database, what should I do to make the following image look like

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

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

HashSet add

Scanf function of input and output function in C language

如何在 FastReport VCL 中通过 Outlook 发送和接收报告?
Printf function of input and output function in C language

2022 summer practice (PowerDesigner tutorial learning record) (first week)

【ARXIV2204】Simple Baselines for Image Restoration

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
随机推荐
How to send and receive reports through outlook in FastReport VCL?
Jsonp single sign on permission verification
C language classic 100 question exercise (1~21)
HDU 1435 stable match
HDU 3078 network (lca+ sort)
Class class added in ES6
Data security is gradually implemented, and we must pay close attention to the source of leakage
How about ink cloud?
ES6 new variable modifiers let and const, new basic data type symbol
Interpretation of afnetworking4.0 request principle
11. < tag dynamic programming and subsequence, subarray> lt.115. Different subsequences + Lt. 583. Deletion of two strings DBC
【ARXIV2204】Simple Baselines for Image Restoration
Microservice failure mode and building elastic system
使用nfpm制作rpm包
Check box error
Professor dongjunyu made a report on the academic activities of "Tongxin sticks to the study of war and epidemic"
Have you learned the common SQL interview questions on the short video platform?
SMD component size metric English system corresponding description
JMeter related knowledge sorting
FreeRTOS learning (I)