Creating and Maintaining Databases

Creating Indexes on Views

Indexes can be defined on views. Indexed views are a method of storing the result set of the view in the database, thereby reducing the overhead of dynamically building the result set. An indexed view also automatically reflects modifications made to the data in the base tables after the index is created.

Note  You can create indexed views only if you install Microsoft® SQL Server™ 2000 Enterprise Edition or Microsoft SQL Server 2000 Developer Edition.

Indexed views include these benefits:

The Index Tuning Wizard recommends indexed views in addition to recommending indexes on base tables. Using the wizard greatly enhances an administrator's ability to determine the combination of indexes and indexed views that optimize the performance of the typical mix of queries executed against a database.

Indexed views can be more complex to maintain than indexes based on base tables. You should create indexes only on views where the improved speed in retrieving results outweighs the increased overhead of making modifications.

See Also

Designing an Indexed View

Creating an Indexed View

Using Indexes on Views