Adding Table Index

Creating Index from GUI

To add an index to a table, open that table, switch to the Indexes page of the Table window, and click Add Index button.

Creating a table index in Database Tour

After you click OK button, you will be asked for the index name. You either confirm the application generated name or specify another one.

Creating Index Options

Index fieldsFields to include to the index (except a case when index is based on expression).
PrimaryThe index has to be primary key.
UniqueThe index must be unique.
DescendingThe index must store the key values in descending order.
Case sensitiveThe index must be case sensitive.
ExpressionThe index is based on expression instead of field / column list. When you choose this option, must fill the expression too.

Creating Index by SQL

Alternatively, you can create indexes by SQL means (except a few types of databases which does not support this). Most of relational databases allow to add an index by executing SQL command like this:

CREATE [UNIQUE] INDEX ix_deal_category_values_deal_category ON deal_category_values (deal_id, category_id)

or this (if primary key constraint based on index):

ALTER TABLE deal_category_values ADD CONSTRAINT pk_deal_category_values PRIMARY KEY (deal_id, category_id)

Please read your database documentation to learn the correct syntax and all possible options.

Notes

  1. Not all database types support all index options. If you have errors when creating an index, try another set of options or another way of creating the index (SQL instead interface or vice versa).
  2. For some database types of database engines, the information about indexes on Indexes page can be not available or can be less informative.
  3. For some database types of database engines, it is needed to reopen the table to see changes in the table indexes after adding an index.

See also