Analyze Mysql InnoDB indexes and mysqlinnodb Indexes
Abstract:
This article introduces the InnoDB Index-related knowledge of Mysql, from various trees to the indexing principle to the details of storage.
InnoDB is the default storage engine of Mysql
The last in a series of Postgres posts, Pat Shaughnessy wrote based on he presentation at the Barcelona Ruby Conference. You can also watch the video recording of the presentation. The series was originally published in his personal blog, and we is
2 MySQL storage engine and IndexIt can be said that the database must have an index, the retrieval process becomes a sequential lookup without an index, and the time complexity of O (n) is almost intolerable. It's very easy to imagine how a table
Question: Let's turn to an article that intuitively introduces various types of B trees.
B tree
That is, the binary search tree:
1. All non-leaf nodes have at most two sons (left and right );
2. All nodes store a keyword;
3. The left pointer of a
File storage to choose a data structure such as B + Tree"File storage to choose a data structure like B + Tree"--remember correctly, this is a Min of the data structure book. I do not know whether I did not look closely or she did not say, anyway,
Read Catalogue
1. Sequential Lookup
2. Two points Search
3. Interpolation Lookup
4. Fibonacci Lookup
5. Tree Table Lookup
6. Block Lookup
7. Hash Lookup
Looking for a specific information element in a large
B-tree job writing, writing C++b-tree programming jobsDeveloped by Jerry Cain of Stanford University and adapted by Jingling Xue.We ' ve learned that C + + considers the preservation of type information to being much moreImpor-tant than C ever does.
MySQL's MyISAM, InnoDB engine uses B + Tree indexes by default (displayed as "BTREE" when queried), and this article discusses two issues:
Why do major databases such as MySQL choose the index structure of B + trees?
How to understand
MySQL Index principle Index purposeThe goal of the index is to improve the efficiency of the query, you can analogy dictionary, if you want to check the word "MySQL", we definitely need to locate the letter M, and then find the Y letter from the
B-TreeBinary search tree:1. All non-leaf nodes have a maximum of two sons (left and right);2. All nodes store a keyword;3. The left pointer of a non-leaf node points to a subtree smaller than its key, and the right pointer points to a subtree larger
B-TreeBinary search tree:1. All non-leaf nodes have a maximum of two sons (left and right);2. All nodes store a keyword;3. The left pointer of a non-leaf node points to a subtree smaller than its key, and the right pointer points to a subtree larger
With its excellent performance, low cost and rich resources, MySQL has become the preferred relational database for most Internet companies. Although excellent performance, but the so-called "good horse with a good saddle", how to better use it, has
An index is a structure that sorts the values of one or more columns in a database table and uses an index to quickly access specific information in a database table.Depending on the capabilities of your database, you can create three indexes in the
What are B, B-, B +, and B * trees?
B tree
That is, the binary search tree:
1. All non-leaf nodes have at most two sons (left and right );
2. All nodes store a keyword;
3. The left pointer of a non-leaf node points to the subtree smaller than its
B- Treebinary search tree:1. all non-leaf nodes have a maximum of two sons (left and right); 2. all nodes store a keyword;3. the left pointer of a non-leaf node points to a subtree smaller than its key, and the right pointer points to a subtree
Excellent blog:
The data structure and algorithm principle behind MySQL index
B-Tree, B-tree, + + tree, b* tree "Turn", MySQL index
The things about MySQL and B-trees
The nature of the indexThe official MySQL definition
B-Tree (B-tree) is a balanced lookup tree designed for auxiliary access devices such as disk, which implements find, sequential read, insert, and delete operations with O (log n) time complexity . Because the B-tree and B-tree variants perform well
The original: Everyone is DBA (VII) B-Tree and + + TreeB-Tree (B-tree) is a balanced lookup tree designed for auxiliary access devices such as disk, which implements find, sequential read, insert, and delete operations with O (log n) time complexity
The two-fork search tree is described earlier, and he has no problem with the efficiency of finding and inserting in most cases, but he is less efficient in the worst case. The data structure of the balanced lookup tree introduced in this article
Two fork Tree1. All non-leaf nodes have a maximum of two sons (left and right);2. All nodes store a keyword;3. The left pointer of a non-leaf node points to a subtree smaller than its key, and the right pointer points to a subtree larger than its
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.