Manipulating Data Skipping Indices 

The following operations are available:

  • ALTER TABLE [db].name ADD INDEX name expression TYPE type GRANULARITY value AFTER name [AFTER name2] - Adds index description to tables metadata.

  • ALTER TABLE [db].name DROP INDEX name - Removes index description from tables metadata and deletes index files from disk.

  • ALTER TABLE [db.]table MATERIALIZE INDEX name IN PARTITION partition_name - The query rebuilds the secondary index name in the partition partition_name. Implemented as a mutation.

The first two commands areare lightweight in a sense that they only change metadata or remove files.

Also, they are replicated, syncing indices metadata via ZooKeeper.

replicated variants).

Rating: 1.6 - 24 votes

Was this content helpful?
★★☆☆☆