How to create an index view? I have a view which is doing summation of several columns:

Select cola, colb, cola + colb + colc from table tbl_a


Can I know what are the indexes I should create for the view to improve its performances?
Some thoughts...


what filters or joins will you use on the view? These determine what indexes you'll need on the table
have you considered a computed column to pre-sum cola+colb at the table level?


Personally, I avoid views because a view doesn't have persistence (unless it is indexed itself): it is simply a macro expanded by the query optimiser. That is, say you have 2 views that join (one with 3 table, one with 4 tables): the actual query plan will show all 7 tables.

In the case above, you have no filters. This means that no index can help you: you'll get a clustered index (which is actually the table and you do have a clustered index, right?) scan