Materialize Documentation
Join the Community github/materialize


New in v0.4.3.

ALTER INDEX changes the parameters of an index.


ALTER INDEX name SET ENABLED ( field = val , ) RESET ( field , )
Field Use
name The identifier of the index you want to alter.
ENABLED Enable the index, which lets Materialize use it again after being disabled.
field The name of the parameter you want to alter.
val The new value for the parameter.


Enabling indexes

After booting Materialize in --disable-user-indexes mode, you can enable individual indexes. This lets Materialize use the index again, which:


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.

Available parameters

Name Meaning
logical_compaction_window Overrides the logical compaction window for the data stored in this index. The default value is controlled by the --logical-compaction-window command-line option.


To adjust the logical compaction window for the index named some_primary_idx:

ALTER INDEX some_primary_idx SET (logical_compaction_window = '500ms')

To reset the logical compaction window to its default value:

ALTER INDEX some_primary_idx RESET (logical_compaction_window)

See also

Did this info help?
Yes No