Applies To„Visio“ 2 planas „Visio Professional 2024“ Visio Professional 2021 „Visio Professional 2019“ „Visio Professional 2016“

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 Visio automatically creates.

Note: The Database Model diagram is only available in certain versions of Visio. See Can't find the database modeling features? for more information.

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.

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.

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.

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.

Can't find the database modeling features?

Visio Standard does not include the Database Model Diagram template.

Visio Professional and Premium editions support the reverse engineering features for the Database Model Diagram template (that is, using an existing database to create a model in Visio) but it does not support forward engineering (that is, using a Visio database model to generate SQL code).

Note: You can find the full suite of database modeling features, including both reverse engineering and forward engineering, in Visio for Enterprise Architects. Visio for Enterprise Architects is included in MSDN Premium Subscription, which is available with Visual Studio Professional and Visual Studio Team System role-based editions.

If you are using Visio Plan 2 and want to learn about how to engineer an existing database into a database model, see the topic, Reverse engineer an existing database.

Create a Database Model diagram

Reikia daugiau pagalbos?

Norite daugiau parinkčių?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.