Alter Index



Indexes come in two varieties: unique keys (UNIQUEKEY) and non-unique indexes (INDEX). Both are created, dropped, rebuilt and analyzed the same way. Indexes improve the performance of queries that filter on the indexed fields. See Create Index for how queries use them.

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

round-pushpin Creates a unique key on Name.
CREATE UNIQUEKEY UK_Name
(
    Name
) ON WordList:Language


round-pushpin Drops an index and a unique key. Dropping an index that does not exist does nothing.
DROP INDEX IX_LanguageId ON WordList:Word
DROP UNIQUEKEY UK_Name ON WordList:Language




Home
The home page
SQL :: Analyze Index
Reports the statistics of an index.
SQL :: Analyze Schema
Reports the size of a schema's documents and the statistics of its indexes.
SQL :: Attach Schema
Copies a detached schema (namespace) into the database.
SQL :: Create Index
Creates an index or a unique key to speed up queries.
SQL :: Insert
Insert creates new documents in a schema.
SQL :: Keywords
A breakdown of all of the statements and keywords supported by the query processor.
SQL :: Partitions
Removed: index partitions no longer apply.
SQL :: Rebuild Index
Rebuilds an index from the documents in its schema.
SQL :: Where
The where clause filters the documents read, updated or deleted by a statement.