当前位置:网站首页>[HBZ sharing] InnoDB principle of MySQL
[HBZ sharing] InnoDB principle of MySQL
2022-06-29 11:37:00 【hbz-】
When the primary key is not configured Mysql Of InnoDB how ?
- Mysql I will use my own rowid A primary key
InnoDB What is the underlying data structure of ?
- B+Tree
BTree Characteristics (MyISAM)
- Nonclustered indexes , namely 【 Indexes 】 and 【 Corresponding data 】 Are two separate files .
- Find the corresponding data , Node key With data below data, It's a 16 It's binary , This data It means that key The corresponding position in the data file , Then I will take this 16 It's binary data Go to the data file to find the corresponding data
B+Tree Characteristics (InnoDB)
- Clustered index , namely 【 Indexes 】 and 【 Corresponding data 】 It's together , In a file
- Find the corresponding by index key after , The content of this data is actually the same as key It's together , Just retrieve the data directly , No need to hold data Go to another file to find , This is a little
- B+Tree The leaf node of key, The primary key id Is ordered , From small to arranged , In other words, it is also very good for range search
- Range lookup , such as id > 15, Leaves key=15 All the following data are required , because id Are arranged in order ,15 Back node , Must be greater than 15 Of
Why? InnoDB The engine needs a primary key , And it is recommended to use integer ?
- B+Tree The bottom layer may perform some value comparison operations , At this time, the integer will highlight the advantage , such as id > 15.
- If you do not use integers , While using uuid, If range query is used later , That can only pass through time , Cannot pass primary key id
边栏推荐
- (JS) catch errors (exceptions)
- [3 questions per day (2)] minimum operand for generating alternate binary strings
- 涂鸦云开发 demo 登录
- 【高并发】2.8万字的Callable和Future面试知识点总结,看完我直接面进了字节跳动,原谅我有点飘了(上)
- 软件工程导论——第五章——总体设计
- The former security director of Uber faced fraud allegations and concealed the data leakage event
- Pipeline aggregations管道聚合-Sibling-1
- (JS) imitate an instanceof method
- Qt学习05 Qt Creator工程介绍
- 中国计算语言学大会、全国知识图谱与语义计算大会赛题火热进行中
猜你喜欢

XML外部实体注入漏洞(一)

Exclusive interview with head of suss NIFT: the future of Web3 is inseparable from the governance of "everyone for me, I for everyone"

Opencv4.0 installation of raspberry pie for Xiaobai

Google Earth engine (GEE) - Gedi L2a vector canopy top height (version 2) global ecosystem data set

Qt学习02 GUI程序实例分析

软件工程导论——第五章——总体设计

Modbustcp protocol WiFi wireless learning single channel infrared module (round shell version)

【每日3题(3)】重新格式化电话号码

Nature | 全球海洋微生物组的生物合成潜力

多线程实现客户端与服务端通信(初级版本)
随机推荐
Pipeline aggregations pipeline aggregation-sibling-1
Shell quotation marks and escape are rarely noticed, but they are often used in writing scripts
X-FRAME-OPTIONS web page hijacking vulnerability
在日本的 IT 公司工作是怎样一番体验?
CTO专访:合见工软深化产品布局 加速国产EDA技术革新
涂鸦云开发 demo 登录
【高并发】2.8万字的Callable和Future面试知识点总结,看完我直接面进了字节跳动,原谅我有点飘了(上)
重建中国科研自信——2022最新自然指数排行榜(Nature Index 2022 )公布,中国的研究产出增幅最大...
Cornerstone of efficient remote office: effective communication | community essay solicitation
(JS) status mode
Micro blog comment architecture design
海泰前沿技术|隐私计算技术在医疗数据保护中的应用
Nature | 全球海洋微生物组的生物合成潜力
Ikvm Net project progress
Thoroughly understand JVM Series 7: what is the flow process of objects in the generational model?
Qt学习10 初探 Qt 中的消息处理
Nuc980 started successfully
Data analysis method and Thinking: funnel analysis
Nuc980 open source project 16- start from SPI flash (w25q128)
Take another picture of cloud redis' improvement path