当前位置:网站首页>Deeply understand the underlying data structure and algorithm of MySQL index
Deeply understand the underlying data structure and algorithm of MySQL index
2022-07-27 03:23:00 【tea-Sir】
The essence of index
Sort the data in the database , Each time you query, you can quickly find the target data according to the conditions .
b-tree Trees
Leaf nodes have the same depth , And the pointer of the leaf node is null ;
Each node stores key-value, All indexes are not duplicate ;
The index is incremented from left to right ;

b+tree Trees
Only leaf nodes store key-value, Other nodes store key;
The leaf node contains all indexes ;
Leaf nodes are connected by pointers , Improve the access performance of the interval ;

MyISAM Storage engine index implementation
Nonclustered index : Index files and data files are stored separately .

InnoDB The index to achieve
Clustered index : The index and data are consistent , So you must have a primary key .
Adopted b+tree Tree structure storage , The leaf node contains all indexes and data .

Left most matching principle
The union index needs to match columns from left to right .
边栏推荐
猜你喜欢

The diagram of user login verification process is well written!

消息被拒MQ

spark学习笔记(四)——sparkcore核心编程-RDD

Abbkine AbFluor 488 细胞凋亡检测试剂盒特点及实验建议

周全的照护 解析LYRIQ锐歌电池安全设计

阿里 Seata 新版本终于解决了 TCC 模式的幂等、悬挂和空回滚问题

Hcip day 14 notes

C语言const用法详解

Social wechat applet of fanzhihu forum community

It's too strong. An annotation handles the data desensitization returned by the interface
随机推荐
易灵思T35 FPGA驱动LVDS显示屏
力扣(LeetCode)207. 课程表(2022.07.26)
Technology vane | interpretation of cloud native technology architecture maturity model
JMeter distributed pressure measurement
[flask] the server obtains the request header information of the client
图解 SQL,这也太形象了吧!
$128million! IQM, a Finnish quantum computing company, was supported by the world fund
索引最佳实践
Call jshaman's Web API interface to realize JS code encryption.
[从零开始学习FPGA编程-54]:高阶篇 - 基于IP核的FPGA开发-PLL锁相环IP核的原理与配置(Altera)
架构基本概念和架构本质
安全员及环保员岗位职责
在线问题反馈模块实战(十五):实现在线更新反馈状态功能
spark:地区广告点击量排行统计(小案例)
Yilingsi T35 FPGA drives LVDS display screen
“date: write error: No space left on device”解决
HCIP第十三天笔记
Source code analysis of warning notification for skywalking series learning
How many implementation postures of delay queue? Daily essential skills!
围圈报数(北理工机试题)(DAY 83)