如何删除聚集索引扫描

时间:2017-03-07 10:41:01

标签: sql database

显示聚集索引扫描的SQL EP计划。但主键列已经有聚簇索引。希望能帮到这个谢谢!

CREATE TABLE T1
(KEY INT IDENTITY(1,1) NOT NULL,
CODE VARCHAR(50), 
DESCRIPTION VARCHAR(254),
ACTIVE BIT,CONSTRAINT [PK_KEY PRIMARY KEY CLUSTERED (KEY ASC) 
WITH (PAD_IDEX = OFF, STATISTICS_NORECOMPUTE = OFF,IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCAKS=ON,ALLOW_PAGE_LOCK=ON) [TD]) 
        ON [TD]INSERT INTO T1 VALUES(1,'ASS','DESC',1) 

INSERT INTO T1 VALUES(2,'PRO','PROP',1)
INSERT INTO T1 VALUES(3,'COL','CLLECTION',1)
INSERT INTO T1 VALUES(4,'NOA','NOA',0)
INSERT INTO T1 VALUES(5,'NOPA','NOPA',1)

实际查询:

SELECT DESCRIPTION FROM T1 WHERE KEY=4

0 个答案:

没有答案