当前位置:网站首页>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,例如单一索引直接命中记录就是覆盖索引。组合索引中查询如果只是基本的等于查询或者其他可以直接命中到记录的查询,是不涉及回表查询的,这种情况也是覆盖索引。
边栏推荐
- C language: some self realization of string functions
- 【ARXIV2203】CMX: Cross-Modal Fusion for RGB-X Semantic Segmentation with Transformers
- 【CVPR2022】Multi-Scale High-Resolution Vision Transformer for Semantic Segmentation
- Interpreting the source code of cfrunloopref
- How about ink cloud?
- 在外包公司两年了,感觉快要废了
- Professor dongjunyu made a report on the academic activities of "Tongxin sticks to the study of war and epidemic"
- 从微服务基本概念到核心组件-通过一个实例来讲解和分析
- Making RPM packages with nfpm
- PC side bug record
猜你喜欢

RT based_ Distributed wireless temperature monitoring system based on thread

多御安全浏览器将改进安全模式,让用户浏览更安全

How about ink cloud?

Google browser cannot open localhost:3000. If you open localhost, you will jump to the test address

MySQL basic query

RT_ Use of thread mailbox

Scanf function of input and output function in C language

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

Have you ever seen this kind of dynamic programming -- the stock problem of state machine dynamic programming (Part 2)

Dcgan:deep volume general adaptive networks -- paper analysis
随机推荐
Using RAC to realize the sending logic of verification code
凛冬已至,程序员该怎么取暖
Reading sdwebimage source code Notes
Data security is gradually implemented, and we must pay close attention to the source of leakage
MySQL basic query
这种动态规划你见过吗——状态机动态规划之股票问题(中)
RT_ Use of thread message queue
After ruoyi generates the code corresponding to the database, what should I do to make the following image look like
【计算机三级信息安全】信息安全保障概述
What is the reason why the easycvr national standard protocol access equipment is online but the channel is not online?
【ARIXV2204】Neighborhood attention transformer
How to successfully test php7.1 connecting to sqlserver2008r2
First acquaintance with C language (2)
Struct模块到底有多实用?一个知识点立马学习
【CPU占用高】software_reporter_tool.exe
测试开发---自动化测试中的UI测试
regular expression
MySQL date and time function, varchar and date are mutually converted
Read the paper -- a CNN RNN framework for clip yield prediction
Table image extraction based on traditional intersection method and Tesseract OCR