Creating and Modifying Indexes in Design Editor

www.altova.com Print this Topic Previous Page Up One Level Next page

Home >  Exploring and Changing the Database Structure > Indexes >

Creating and Modifying Indexes in Design Editor

In the Design Editor, indexes are shown in a separate section of the table display. Here you see at a glance which columns are included in the index definition, and whether they will be queried in ascending or descending order. Indexes generated automatically have the same name as the corresponding primary or unique key. These indexes are displayed in the Indexes section but cannot be modified.

design_index

Table indexes in Design Editor

 

To define an index in the Design Editor:

1.Do one of the following:

 

Right-click the column where you want to create the index definition, and select Make Index from the context menu.
Click the column and, keeping the mouse button pressed, drag it into the Index section.
Right-click into the table and select Insert new | Index from the context menu.
Expand the Index section (by default, it is collapsed) and click Create new index ic_add-column .

 

2.Select the appropriate index type (non-clustered, clustered, or XML index) from the sub-menu that opens. The types of indexes that are available depend on the database kind you are using.
3.Optionally, change the index properties in the Properties window. Available options vary by database kind. To see the available options in the Properties window, first click the index in Design Editor.
4.In the Index column, enter a descriptive name and press Enter.
5.In the Columns column, optionally double-click the column and select a different column from the drop-down list.
6.Click into the Order column and select either ascending or descending sort order and press Enter.
7.Optionally, click the plus symbol ic_add-column and select a column from the drop-down list and repeat this step to add one or more additional columns to the index definition.
8.Click Execute ic_execute-sql to run the generated database change script.

 

Note the following:

 

Normally, only one clustered index can be defined per table. If a clustered index already exists, the option to add a clustered index is disabled.
In MariaDB, MySQL, and SQLite databases, a unique key will be created automatically by the database when you add a unique index (after the database change script is executed, see step 8).

© 2019 Altova GmbH