Home > Database > Mysql Tutorial > body text

mysql 组合索引的实现原理是什么?

WBOY
Release: 2016-06-06 09:37:08
Original
2425 people have browsed it

mysql组合索引索引

在网络上看到资料了解到 mysql 的索引使用 B-tree 实现的,使用关键字来存储索引的列。

单列的索引是使用一个 B-tree 的方式实现的。

但是,网上的大多资料都没有提及,组合索引的具体实现。

我个人猜测组合索引也是使用一个 B-tree 来实现,其中关键字同时存储的是多个列的。

B-tree 根据多个列进行排序。这样正好可以很好地解释“最左前缀”。

不知道我的猜测是否正确?!!!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!