gpt4 book ai didi

sql - 默认情况下,DB2 表的 PK 是聚簇索引吗?

转载 作者:行者123 更新时间:2023-12-04 11:13:27 27 4
gpt4 key购买 nike

这可能是一个愚蠢的问题,但我想确定 100%。

默认情况下,DB2 表的 PK 是聚簇索引吗?

最佳答案

发件人: DB2 docs - Clustering indexes

Although a table can have several indexes, only one index can be a clustering index. If you do not define a clustering index for a table, DB2 recognizes the first index that is created on the table as the implicit clustering index when it orders data rows.



所以不,默认情况下,主键不是表的聚集索引。

创建的第一个索引(无论是否唯一)是“隐式”聚集索引,DB2 尝试尽可能按照该索引值的顺序插入记录。

如果您稍后创建另一个索引并将其标识为集群,那么 DB2 将其标识为集群索引,但 不重新排列数据 这已经在表中了。这可以通过 REORG 实用程序来完成。

关于sql - 默认情况下,DB2 表的 PK 是聚簇索引吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8538222/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com