聚集和非聚集索引的差异

编程入门 行业动态 更新时间:2024-10-28 20:22:11
本文介绍了聚集和非聚集索引的差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

任何人都可以告诉我有关聚簇和非聚簇索引的真实示例.

Can Anyone tell me real life example on Clustered And Nonclustered Index. Thanks.

推荐答案

聚集索引是一种特殊的索引类型,它重新排序表中记录的物理存储方式. 因此,表只能有一个聚集索引,并且该聚集索引通常是在主键上进行的.聚簇索引的叶节点包含数据页. 非聚集索引是一种特殊类型的索引,其中索引的逻辑顺序与磁盘上行的物理存储顺序不匹配.非聚集索引的叶节点不包含数据页.相反,叶节点包含索引行. 每个表最多可以有249个非聚簇索引 请参考 www.sql-server-performance/2004/index-data-结构/ [^ ] A clustered index is a special type of index that reorders the way records in the table are physically stored. Therefore table can have only one clustered index and this is usually made on the primary key. The leaf nodes of a clustered index contain the data pages. A nonclustered index is a special type of index in which the logical order of the index does not match the physical stored order of the rows on disk. The leaf node of a nonclustered index does not consist of the data pages. Instead, the leaf nodes contain index rows. There can be as many as 249 nonclustered index per table Refer www.sql-server-performance/2004/index-data-structures/[^]

更多推荐

聚集和非聚集索引的差异

本文发布于:2023-10-15 02:17:51,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1492958.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:索引   差异

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!