索引解析

来源:互联网 发布:网络质量监控技术 编辑:程序博客网 时间:2024/06/16 20:06
USE pubs
GO
/*表:authors 列:phone 索引:IX_cxphone*/
IF EXISTS (SELECT name FROM sysindexes WHERE name = 'IX_cxphone')
DROP INDEX authors.IX_cxphone
/*--笔试列创建非聚集索引:填充因子为 30%--*/
CREATE NONCLUSTERED INDEX IX_cxphone
ON authors(phone)
WITH FILLFACTOR= 30
GO
/*-----指定按索引 IX_cxphone 查询----*/
SELECT * FROM authors WITH (INDEX=IX_cxphone) WHERE phone LIKE '408%'
0 0
原创粉丝点击