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.