当前位置:网站首页>Advanced learning of MySQL -- Application -- index
Advanced learning of MySQL -- Application -- index
2022-07-04 01:59:00 【Magic pig 9898】
install Linux Version of mysql
System : centOS7
msyql: 8.0.26
Index Overview
An index is an ordered data structure
Can help MySQL Efficient data acquisition .
That means : In the database table structure , In addition to saving data , The database also needs to maintain the data structure of index , Use these structures to point to the saved data . In this way, advanced search algorithms can be used in these data structures , Quickly locate the original data .

Index structure
MySQL The index of is implemented in the storage engine layer , Different storage engines have different structures , It mainly includes the following :
Binary tree index structure

improvement :

B-tree Index structure
Take a maximum degree as 5 Of b-tree For example ( Each node can store up to 4 individual key, 5 A pointer to the )
B+tree Index structure
All elements are only in leaf nodes , Those above are just for indexing .
Leaf nodes form a one-way linked list .

Hash Index structure

hsah Features of index :
It can only be used for peer-to-peer comparison , Range query is not supported ;
Cannot sort with index ;
Query efficiency is higher than B+tree;
stay mysql in , Support hash The indexing engine is , memory engine , and InnoDB It has adaptive function hash function , hash The index is the storage engine B+tree Automatically built under specified conditions .
Why B+tree

Index classification






Summary

You can find , Innodb Even if the table stores more than 20 million records , It's only three floors . Efficiency is very high .
If there are hundreds of millions of records , Then we have to consider the sub database and sub table ~
Index Syntax
SQL Performance analysis
Index usage
Index design principles
边栏推荐
- Yyds dry goods inventory override and virtual of classes in C
- Douban scoring applet Part-3
- Why is the operation unsuccessful (unresolved) uncaught syntaxerror: invalid or unexpected token (resolved)
- Setting function of Jerry's watch management device [chapter]
- Override and virtual of classes in C #
- Intel's new GPU patent shows that its graphics card products will use MCM Packaging Technology
- Will the memory of ParticleSystem be affected by maxparticles
- The boss said: whoever wants to use double to define the amount of goods, just pack up and go
- Flex flexible layout, box in the middle of the page
- Idsia & supsi & usi | continuous control behavior learning and adaptive robot operation based on Reinforcement Learning
猜你喜欢

A fan summed up so many interview questions for you. There is always one you need!

Openbionics robot project introduction | bciduino community finishing

Yyds dry goods inventory it's not easy to say I love you | use the minimum web API to upload files

Override and virtual of classes in C #

Chain ide -- the infrastructure of the metauniverse

LV1 tire pressure monitoring

Lightweight Pyramid Networks for Image Deraining

ES6 deletes an attribute in all array objects through map, deconstruction and extension operators

Yyds dry goods inventory override and virtual of classes in C

Basic editing specifications and variables of shell script
随机推荐
Pyinstaller packaging py script warning:lib not found and other related issues
Why is the operation unsuccessful (unresolved) uncaught syntaxerror: invalid or unexpected token (resolved)
Intel's new GPU patent shows that its graphics card products will use MCM Packaging Technology
G3 boiler water treatment registration examination and G3 boiler water treatment theory examination in 2022
LV1 previous life archives
[turn] solve the problem of "RSA public key not find" appearing in Navicat premium 15 registration
14. Process time
Hbuilder link Xiaoyao simulator
Conditional test, if, case conditional test statements of shell script
High level application of SQL statements in MySQL database (I)
Question d: Haffman coding
MySQL advanced (Advanced) SQL statement (I)
Openbionics exoskeleton project introduction | bciduino community finishing
IPv6 experiment
Ceramic metal crowns - current market situation and future development trend
Magical usage of edge browser (highly recommended by program ape and student party)
Pytoch residual network RESNET
Feign implements dynamic URL
Example 073 square sum value judgment programming requires the input of a and B, if a ²+ b ² If the result of is greater than 100, a is output ²+ b ² Value, otherwise output the result of a + B.
Pesticide synergist - current market situation and future development trend