New in v0.4.3.
ALTER INDEX changes the parameters of an index.
|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 option you want to alter.|
|val||The new value for the option.|
The following option is valid within the
|Name||Permitted values||Default value||Description|
||SQL interval string||‘1ms’||Overrides the logical compaction window for the data stored in this index. The default value is controlled by the
After booting Materialize in
--disable-user-indexes mode, you can enable
individual indexes. This lets Materialize use the index again, which:
- Restarts the dataflow associated with the index, which can in turn e.g. start ingesting data from sources or sending data to sinks
- Allows inserting into 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.
To adjust the logical compaction window for the index named
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);