Rebuild Index



REBUILD INDEX (or REBUILD UNIQUEKEY) discards an index's entries and rebuilds them from the documents in the schema. Indexes don't become fragmented, so rebuilding is only needed:
  • After upgrading from a version of Katzebase that used an older index format. Until they are rebuilt, old indexes are ignored by queries, and inserts, updates and deletes on their schema fail with an error that names the index.
  • After attaching a schema that contains old indexes, see Attach Schema.
  • To remove stale entries left by bugs in older versions.


round-pushpin Rebuilds an index.
REBUILD INDEX IX_Word_Text ON WordList:Word

round-pushpin Rebuilds a unique key.
REBUILD UNIQUEKEY UK_Language_Id ON WordList:Language

Removed options

The WITH (Partitions = n) option is still accepted but is ignored, see Partitions.




API :: Client
Using the NTDLS.Katzebase.Api client library from .NET.
Home
The home page
SQL :: Alter Index
Creates and drops indexes and unique keys.
SQL :: Alter Schema
Creates, alters and drops schemas.
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 :: Detach Schema
Removes a schema (namespace) from the database and moves its files to a folder.
SQL :: Insert
Insert creates new documents in a schema.