Adding indexes to tables is a generally accepted means for improving database performance. Indexes provide a keyed lookup to rows of data that can improve database access and avoid the performance nightmare of a table scan where the entire contents of a table are searched. The same basic principles apply to indexes on views, but indexed views are best utilized to increase performance in the following scenarios:
Aggregations such as
AVG can be precomputed and stored in the index to minimize the potentially expensive computations during query execution.
Large table joins can be persisted to eliminate the need ...