Build Index

Add indexes to existing data. Currently, only vector indexes and inverted indexes are supported. Bloom filters are not supported.

Syntax

-- Syntax 1, add index to the existing data of the entire table by default
BUILD INDEX index_name ON [schema].table_name;
-- Syntax 2, can specify partition, can specify one or more, supports =, !=, >, >=, <, <=
BUILD INDEX index_name ON table_name WHERE partition_name1 = '1' and partition_name2 = '2';
  • index_name: Specify the index name to be added
  • Support specifying partition construction: One or more can be specified

Description

Executing BULD INDEX is a synchronous task that consumes computing resources during execution. You can check the progress through Job Profile.

When the data volume of the partition table is large, it is recommended to create indexes sequentially by partition.

Example

BUILD INDEX bulkload_data_index ON public.bulkload_data ;