CREATE RANGE INDEX

Creates a new range index for a given column.

Syntax

CREATE RANGE INDEX range_index_name
ON [schema_name.]table_name.dim_column_name

Description

The range index is used for optimizing performance of range-based queries.

Example

CREATE RANGE INDEX quantity_groups
ON store_sales.ss_quantity

Best practice

Use it to optimize queries in which the WHERE clause contains filtering of wide ranges (ranges that contain hundreds or more of values).

Limitations

Currently, range index can be created only for INT and BIGINT columns.

See Also

DROP RANGE INDEX