The Left-Prefix Index Rule is determined by the B+tree structure

联合索引遵循「最左匹配原则」,MySQL 联合索引创建的时候会对 (a, b) 其中的 a 先进行排序,再在 a 的基础上对 b 进行排序。如果是 (a, b, c) 也是一样的方式...

February 10, 2023 428 words 1 min

The difference between B-tree and B+tree

B-Tree B+Tree All internal nodes and leaf nodes contain data pointers along with keys. Only leaf nodes contain data pointers along with keys, internal nodes contain keys only. There are no duplicate keys. Duplicate keys are present in this, all internal nodes are also present at leaves. Leaf nodes are not linked to each other. Leaf nodes are linked to each other. Sequential access of nodes is not possible. All...

February 10, 2023 385 words 1 min