Whats new for Indexed Views in SQL Server 2005?
SQL Server 2005 contains many improvements for indexed views compared with SQL Server 2000. The set of indexable views has been expanded to include those based on: • Scalar aggregates, including SUM and COUNT_BIG without GROUP BY. • Scalar expressions and user-defined functions (UDFs). For example, given a table T(a int, b int, c int) and a scalar UDF dbo.MyUDF(@x int), an indexed view defined on T can contain a computed column such as a+b or dbo.MyUDF(a). • Persisted imprecise columns. An imprecise column is one whose type is float or real, or a computed column that is derived from a float or real column. In SQL Server 2000, an imprecise column could be used in the select list of an indexed view if it was not part of the index key. An imprecise column could not be used elsewhere inside the view definition either, such as in the WHERE or FROM clauses. SQL Server 2005 allows an imprecise column to participate in the key or inside the view definition if the column is persisted in the bas