Export (0) Print
Expand All

How to create a new index (Query Analyzer)

SQL Server 2000

How to create a new index (Query Analyzer)

To create a new index

  1. On the Query menu, click Show Execution Plan.

  2. Execute the Transact-SQL script in the query pane.

  3. In the result pane, click the Execution Plan tab.

  4. Right-click the icon of the physical operator that suggests that an index needs to be created, and then click Manage Indexes. The Graphical Execution Plan automatically selects the appropriate database and table. Click New.

  5. In Index name, enter the name for the index.

  6. In Column, select the column to appear in the index. Composite indexes can be created by selecting more than one column.

  7. Optionally, select a column, and then click either Move Up or Move Down to change the order of the columns in the index.

  8. Optionally, in Index options, select:
    • Unique values to create a unique index.

    • Clustered index to create a clustered index. If a clustered index already exists, this option is not available.

    • Ignore duplicate values to control what happens when an INSERT statement inserts multiple, nonunique key values into an index. For more information, see CREATE INDEX.

    • Do not recompute statistics (not recommended) to specify that index statistics are not automatically recomputed as the index is updated.

    • Filegroup to specify the filegroup on which to create the index. Click the name of the filegroup.

    • Pad index to leave space open on each interior node of the index. For more information, see CREATE INDEX.

    • Drop existing to delete any existing index of the same name before creating the new index.

    • Fill factor to specify how full SQL Server should make the leaf level of each index page during index creation. For more information, see CREATE INDEX.
  9. Optionally, click Edit SQL to view and edit the Transact-SQL statement used to create the index.

See Also

Graphically Displaying the Execution Plan Using SQL Query Analyzer

Placing Indexes on Filegroups

© 2015 Microsoft