Skip to content

聚集索引与非聚集索引区别 #565

Description

@haitai111

http://blog.codinglabs.org/articles/theory-of-mysql-index.html
中提到MyISAM的索引方式也叫做“非聚集”的,InnoDB的索引方式是“聚集的”。从这两者对比中,自己的感觉是“非聚集索引”是指索引和数据分离(索引保存了数据的地址),“聚集索引”是指索引和数据一起(索引文件就是数据文件)。
可是自己在另一篇博客中看到:http://www.cnblogs.com/aspnethot/articles/1504082.html
聚集索引:该索引中键值的逻辑顺序决定了表中相应行的物理顺序。
非聚集索引: 一种索引,该索引中索引的逻辑顺序与磁盘上行的物理存储顺序不同。

所以,我想知道的是这两种说法是不是都正确??它们两者有对应关系吗?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions