How to index views using a left outer join in SQL Server

I created a view that uses the LEFT OUTER JOIN in SQL Server.

I cannot index views because you cannot put Index in a view using OUTER JOIN .

Any alternatives?

+4
source share
1 answer

Here is an article describing the use of ISNULL(table_id, 0) to create an INNER JOIN with external join effects. It may be useful to you.

The example in this article is good, should be clear enough.

indexedViewsWithOuterJoins

+3
source

Source: https://habr.com/ru/post/1382227/


All Articles