Creating Indexed Views
An indexed view is a view whose result set is stored in the database for fast access. For more background on indexed views, see Indexed Views.
To create an indexed view
- In the SQL Server Enterprise Manager, make sure the Databases node is expanded, and that the node for the target database is expanded, too.
- Right-click on the Views node, then choose New View from the shortcut menu.
- Add tables to the Diagram pane. Because you intend this to be an indexed view, be sure to add only tables that you own.
- Select which columns you want included in the view. Do not use the asterisk (*); you must explicitly select each column that you want to appear in the indexed view.
- Right-click the background of the Diagram pane, then choose Manage Indexes from the shortcut menu. The Indexes dialog box appears.
Note There are many situations in which the Manage Indexes command is unavailable, because there are many restrictions on which views can be indexed. For example, you cannot index a view unless you are the owner of each table contributing to it. For more information about indexed views, see View Indexes.
- Within the dialog box, click New.
- Supply the information for the index definition — index name, index columns and their order, index file group, and the other index settings. For a complete description of these settings, see Indexes Dialog Box.
- Click OK.