• You don't really need a separate indexed view if that's the full query. You could instead add a flag to the dm_document table of whether a matching row existing in the other table for the value in that row, then create a filtered index (if on Enterprise) or regular (if not) on the dm_document table.

    You'd need triggers to properly maintain the flag, but those would be relatively trivial.

    SQL DBA,SQL Server MVP(07, 08, 09) A socialist is someone who will give you the shirt off *someone else's* back.