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
Creates a non-unique index on the Word schema on the LanguageId field.
CREATE INDEX IX_LanguageId
(
LanguageId
) ON WordList:Word
Creates a unique index on the Word schema on the Id field.
CREATE UniqueKey IX_Id
(
Id
) ON WordList:Word
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
- Keywords - A breakdown of all high-level statements available via the query handler.