Monday, October 23, 2017

Create or edit an index in a Database Model diagram

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

Remove an index

Edit index properties

Add, remove, or reorder columns in an index

Create an index in a database model diagram

  1. Open the database model diagram.

  2. 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.

  3. Click New.

  4. In the Create Index dialog box, type a name for the index, and then click OK.

  5. In the Index Type list, select an option to create a unique or non-unique index.

  6. In the Available Columns list, select the name of each column that you want to include in this index, and then click Add .

  7. 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.

Top of Page

Remove an index

  1. Open the database model diagram.

  2. 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.

  3. 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.

Top of Page

Edit index properties

  1. Open the database model diagram.

  2. 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.

  3. In the Index Name list, select the name of the index you want to edit.

  4. 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.

Top of Page

Add, remove, or reorder columns in an index

  1. Open the database model diagram.

  2. 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.

  3. In the Index Name list, select the name of the index you want to modify.

  4. 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.

Top of Page

No comments:

Post a Comment