简体   繁体   中英

How to view the B-tree index structure generated by InnoDB of MySQL?

Is there a way to view the B-tree index structure generated by InnoDB when we specify B-tree index for an attribute of a table?

There are no official tools to view the internals of InnoDB B-tree index structures.

There's an experimental set of tools to examine the internals of InnoDB pages, but it won't display the B-tree in a human-readable way. https://github.com/jeremycole/innodb_ruby

But I believe you're asking for a thing that will not have useful information anyway.

https://dev.mysql.com/doc/refman/8.0/en/innodb-physical-structure.html says:

With the exception of spatial indexes, InnoDB indexes are B-tree data structures.

Specifying USING BTREE for the index type is redundant when using InnoDB. Whether you specify it or not, it will be a B-tree. There is no difference when you specify that index option.

Other storage engines (MEMORY, NDB) support HASH as an alternative index type.

See https://dev.mysql.com/doc/refman/8.0/en/create-index.html#create-index-storage-engine-index-types

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM