Thursday, April 8, 2010

Cannot create a filtered index on a computed column

Wanted to attempt a filtered index today, but got stopped dead in my tracks by this...
Filtered index 'ix_IPs_1' cannot be created on table 'schemaname.tablename' because the column '_lookupchannel' in the filter expression is a computed column. Rewrite the filter expression so that it does not include this column.
Msg 10609, Level 16, State 1, Line 10
So Filtered Indexes cannot be defined on computed columns. Not even PERSISTED ones :(

Microsoft Connect Suggestion to be able to define Filtered Indexes on computed columns in a future edition (please vote!)

Links :
Greg Low : Odd that you can't...
Little Techie
Solace : Filtered Indexes

No comments: