Filtered Indexes v Indexed Views
I was just watching a TechEd Online video on SQL 2008 Q&A and learnt a neat difference between filtered indexes and indexed views.
Indexed Views and Filtered Indexes provide similar functionality. The main differences are
Indexed views
1. provide more complex filters and also a different shape of data, i.e. include a group by.
2. are only considered with Enterprise Edition (without using NOEXPAND hint)
3. are NOT automatically considered, the query has to go through a number of levels of query optimisation before indexed views are considered
4.are seperate entities, if your indexed view doesn't cover all the columns you have to join back to the source table to get the additional columns
Filtered Indexes
1. Only allow a simple set of filters
2. Are considered with ALL editions
3. Are considered earlier in the optimisation stack than in Indexed Views even for trivial plans (very simple ones)
4. Are just like a normal index and so still have reference to source table. So if index isn't a covering one the query op can perform a lookup to the base table to get the other data
-