易截截图软件、单文件、免安装、纯绿色、仅160KB

SQL Server2008 Filtered Indexes

SQL Server Filtered Indexes - What They Are, How to Use and Performance Advantages
Written By: Arshad Ali -- 7/2/2009 -
Problem
SQL Server 2008 introduces Filtered Indexes which is an index with a WHERE clause. Doesn’t it sound awesome especially for a table that has huge amount of data and you often select only a subset of that data? For example, you have a lot of NULL values in a column and you want to retrieve records with only non-NULL values (in SQL Server 2008, this is called Sparse Column). Or in another scenario you have several categories of data in a particular column, but you often retrieve data only for a particular category value.
In this tip, I am going to walk through what a Filtered Index is, how it differs from other indexes, its usage scenario, its benefits and limitations.
Solution
A Filtered Index, which is an optimized non-clustered index, allows us to define a filter predicate, a WHERE clause, while creating the index. The B-Tree containing rows from the filtered index will contain only those rows which satisfy the filter criteria used while creating the index. This optimized index offers several benefits over a full table non-clustered index as follows:
As discussed above, the filtered index contains only those rows which satisfy the defined filter criteria. As a result it reduces the storage space requirement for the index. In the example below I will explain it more.
The filtered statistics or statistics for a filtered index are more compact and accurate, because they consider only the rows in the filtered index and the smaller size of the filtered index reduces the cost/overhead of updating the statistics.
The impact of data modification is less with a filtered index as it is updated only when the data of the index is impacted or a new record is inserted matching the filter criteria.
Maintenance costs will be reduced as well since only a subset of rows will be in consideration while re-organizing or rebuilding the index


相关文档:

将access导入SQL server

一、SQL SERVER 和ACCESS的数据导入导出
常规的数据导入导出:
使用DTS向导迁移你的Access数据到SQL Server,你可以使用这些步骤:
  ○1在SQL SERVER企业管理器中的Tools(工具)菜单上,选择Data Transformation
  ○2Services(数据转换服务),然后选择  czdImport Dat ......

Access和SQL2000中语句的区别

1 ,对于日期字段字段
access表示为:#1981-28-12#
SQLSERVER2000表示为:''1981-02-12''
2,SQL语句区别,select ,update 在对单表操作时都差不多,
但多表操作时update语句的区别ACCESS与SQLSERVER中的Update语句对比:
SQLSERVER中更新多表的Update语句:
Update Tab1
SET a.Name = b.Name
from Tab1 a,Tab2 b
Whe ......

收集的又一道有趣的SQL题

作者: 三十而立时间:2009年10月15日 21:59:51本文出自 “inthirties(三十而立)”博客,转载请务必注明作者和保留出处http://blog.csdn.net/inthirties/archive/2009/10/15/4673268.aspx 把次序不对的列找出来 请问 下面的表该如何排序?我有下面的表。次序如下 其中第5个记录和第6条记录次序颠倒了。这个表数据量比较 ......

PL/SQL识趣

作者: 三十而立时间:2009年10月15日 19:21:13本文出自 “inthirties(三十而立)”博客,转载请务必注明作者和保留出处http://blog.csdn.net/inthirties/archive/2009/10/15/4673331.aspx 学习是枯燥的,所以作为一个学习者,要学会在学习中找到快乐,这样才能激发兴趣,兴趣是最好的老师,这样,学习就慢慢的变成了一件 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号