Updates a row-level index's mutable properties such as the auto-update flag and algorithm-specific options.
ALTER INDEX <name> ON TABLE <table> SET (<key> = <value> [, <key> = <value> ...])
## Overview ALTER INDEX updates the mutable configuration of an existing row-level index. The index data structure and column list are fixed at creation time and cannot be changed; only configuration knobs (auto-update flag, algorithm options) are tunable. ## Behavior - The change is recorded as a new commit on the parent table. The index data is not rewritten; only the index registry entry changes. - Toggling `auto_update` from `false` to `true` does not retroactively bring a stale index up to date. Issue REBUILD INDEX after the ALTER to resync, then the auto-update path keeps it in sync going forward. - Toggling `auto_update` from `true` to `false` stops future maintenance but leaves the existing index intact. The index will go stale on the next parent commit. - The columns and algorithm cannot be changed in place. To switch algorithm or column set, DROP INDEX and CREATE INDEX with the new shape. ## Access Control No specific privilege is required beyond table-level access in the standalone SQL layer. In a Control Plane deployment the table's MODIFY privilege governs index changes. ## Compatibility DeltaForge extension.
| Name | Type | Description |
|---|---|---|
name | Specifies the index name to alter. | |
table | Specifies the parent Delta table that owns the index. | |
set_auto_update | Toggle whether parent writes maintain this index. Set to `true` to enable incremental maintenance on every parent commit; set to `false` to make the index manual-refresh only (REBUILD INDEX). | |
set_options | Additional algorithm-specific configuration to update. Keys not listed in the SET clause keep their previous value. |
-- Promote a manual index to auto-maintained
ALTER INDEX idx_customer ON TABLE orders SET (auto_update = true);
-- Demote an auto-maintained index back to manual refresh
ALTER INDEX idx_customer ON TABLE orders SET (auto_update = false);