Create or edit an index in a Database Model diagram
Indexes help your database system find and sort records faster. Creating indexes for columns that you search frequently can significantly improve the performance of your database.
You can create indexes manually, and you can modify the indexes that Microsoft Office Visio automatically creates.
What do you want to do?
Create an index in a database model diagram
-
Open the database model diagram.
-
Double-click the table to which you want to add an index, and then in the Database Properties window, in the Categories list, click Indexes.
-
Click New.
-
In the Create Index dialog box, type a name for the index, and then click OK.
-
In the Index Type list, select an option to create a unique or non-unique index.
-
In the Available Columns list, select the name of each column that you want to include in this index, and then click Add .
-
In the Indexed Columns list, select the Asc check box to create an index that has an ascending sort order, or clear the check box to create one that has a descending sort order.
The database model diagram is updated automatically.
Note: Some database applications have a limit on the type and number of indexes you can create per table. For specific information, see your database management system (DBMS) documentation.
Remove an index
-
Open the database model diagram.
-
Double-click the table that contains the index that you want to delete, and then in the Database Properties window, in the Categories list, click Indexes.
-
In the Index name list, select the name of the index you want to delete, and then click Delete.
The database model diagram is updated automatically.
Edit index properties
-
Open the database model diagram.
-
Double-click the table that contains the index that you want to edit, and then in the Database Properties window, in the Categories list, click Indexes.
-
In the Index Name list, select the name of the index you want to edit.
-
Edit the properties of the index by doing any of the following:
-
To specify a new name for the index, click Rename.
-
To specify a unique or non-unique index, choose an option in the Index type list.
-
To specify driver-specific index attributes, click Options.
-
The database model diagram is updated automatically.
-
Add, remove, or reorder columns in an index
-
Open the database model diagram.
-
Double-click the table that contains the index that you want to modify, and then in the Database Properties window, in the Categories list, click Indexes.
-
In the Index Name list, select the name of the index you want to modify.
-
Do one of the following:
-
To add a column to an index, under Available columns, select the name of the column, and then click Add.
-
To remove a column from an index, under Indexed columns, select the name of the column, and then click Remove.
-
To reorder a column, under Indexed Columns, select the name of the column, and then drag the column name to its new position in the list.
The database model diagram is updated automatically.
-
No comments:
Post a Comment