Open nissenyeh opened 2 years ago
有沒有可能,有些資料庫的 Primary key 是 clustered index,但有些資料庫的 Primary key 是 non clustered index?
針對這題,查到該篇文章,根據這篇文章
看起來 Primary key 可以是 clustered index 也可以是 non clustered index,只是前者比較常見
Here is the common misconception prevailing in the industry. Primary Key has to be Clustered Index
In reality the statement should be corrected as follows: Primary Key can be Clustered or Non-clustered but it is a common best practice to create a Primary Key as Clustered Index.
clustered index vs non clustered index 的差異?
問題
關於 clustered index vs non clustered index ,我目前我的理解如下,不知道是否正確?
有沒有可能,有些資料庫的 Primary key 是 clustered index,但有些資料庫的 Primary key 是 non clustered index?
clustered index vs non clustered index 跟 primary index vs secondary index 的關係?( Clustered index 必然是 primary index,而 non clustered index 必然是 secondary index 嗎?)
Reference