Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Creates a new range index for a given column.

Syntax

Code Block
languagesql
linenumberstrue
CREATE RANGE INDEX [schema_name.]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

Code Block
languagesql
linenumberstrue
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