2
更改外键的引用索引
我有这样的事情: CREATE TABLE T1 ( Id INT ... ,Constraint [PK_T1] PRIMARY KEY CLUSTERED [Id] ) CREATE TABLE T2 ( .... ,T1_Id INT NOT NULL ,CONSTRAINT [FK_T2_T1] FOREIGN KEY (T1_Id) REFERENCES T1(Id) ) 出于性能(和死锁)的原因,我在T1上创建了一个新索引 CREATE UNIQUE NONCLUSTERED INDEX IX_T1_Id ON T1 (Id) 但是,如果我检查哪个索引引用了FK,则继续引用聚集索引 select ix.index_id, ix.name as index_name, ix.type_desc as index_type_desc, …