标签:技术 use 查询 where 过滤 size head sim bsp
USE IndexDB
GO
SELECT * INTO SalesOrderheader FROM AdventureWorks2008r2.Sales.SalesOrderheader
GO
--Unique Clustered index
CREATE UNIQUE CLUSTERED INDEX ix_SalesOrderheader ON SalesOrderheader(SalesOrderid)
GO
--Filtered Index
CREATE INDEX ix_filtered_index ON SalesOrderheader(orderdate) WHERE orderdate>‘2008-01-01‘
SELECT orderdate,SalesOrderid FROM SalesOrderheader WHERE
orderdate>‘2008-05-01‘
GO
SELECT orderdate,SalesOrderid FROM SalesOrderheader WHERE
orderdate=‘2008-03-01‘
GO
SELECT orderdate,SalesOrderid FROM SalesOrderheader WHERE
参数化查询 可能会导致过滤索引失效
09.索引-过滤索引
标签:技术 use 查询 where 过滤 size head sim bsp
原文地址:http://www.cnblogs.com/ywnwa417/p/6035259.html