Alter Index


Overview
Create, alter or drop an index. or unique key. Indexes come in two varieties unique (UniqueKey) and non-unique (Index), you can create, alter, drop, rebuild and analyze them all the same. Indexes are used to improve read performance of the database.

Examples
round-pushpin Creates a non-unique index on the Word schema on the LanguageId field.
CREATE INDEX IX_LanguageId
(
    LanguageId
) ON WordList:Word

round-pushpin Creates a unique index on the Word schema on the Id field.
CREATE UniqueKey IX_Id
(
    Id
) ON WordList:Word

round-pushpin Creates a non-unique index on the Word schema on multiple fields and uses an explicit non-default partition size.
CREATE INDEX IX_Translation
(
    SourceLanguageId,
    TargetLanguageId,
) ON WordList:Translation WITH (PARTITIONS = 1000)

See also

Related