ALTER INDEX

ALTER INDEX changes the parameters of an index.

Syntax

ALTER INDEX name SET ENABLED ( RETAIN HISTORY = FOR retention_period )
ALTER INDEX name RESET ( RETAIN HISTORY )

Field Use
name The identifier of the index you want to alter.
retention_period Private preview. This option has known performance or stability issues and is under active development. Duration for which Materialize retains historical data for performing time travel queries. Accepts positive interval values (e.g. '1hr'). Default: 1s.

Details

Tables

Note that when enabling indexes on tables, the first index you enable must be the table’s primary index, which was created at the same time as the table itself. Only after enabling the primary index can you enable any secondary indexes.

Privileges

The privileges required to execute this statement are:

  • Ownership of the index.
Back to top ↑