Can we create indexes on views in SQL Server? [closed]

Posted on

Question :

Can we create Indexes on a view in SQL Server 2008? I have heard about indexed view, which can give performance improvement, but the problem is data refresh on those views: Can it be auto updated, once data in base tables changes?

Answer :

Indexed views are always in sync with the data in the underlying tables. You can read more about indexed views here.

Be careful going overly enthusiastic with indexed views: they can be a real performance killer on heavily written tables.

Leave a Reply

Your email address will not be published. Required fields are marked *