ALTER MATERIALIZED VIEW DROP INDEX

Removes an existing index from a SYMBOL column in a materialized view.

Syntax

ALTER MATERIALIZED VIEW viewName ALTER COLUMN columnName DROP INDEX

Parameters

ParameterDescription
viewNameName of the materialized view
columnNameName of the indexed SYMBOL column

When to use

Remove an index when:

  • The index is no longer needed for query patterns
  • You want to reduce storage overhead
  • The column's index is causing more overhead than benefit

Example

Remove index from symbol column
ALTER MATERIALIZED VIEW trades_hourly
ALTER COLUMN symbol DROP INDEX;

Behavior

AspectDescription
Operation typeAtomic, non-blocking, non-waiting
Immediate effectSQL optimizer stops using the index
CleanupAssociated index files are deleted

Permissions (Enterprise)

Dropping an index requires the ALTER MATERIALIZED VIEW permission:

Grant alter permission
GRANT ALTER MATERIALIZED VIEW ON trades_hourly TO user1;

Errors

ErrorCause
materialized view does not existView with specified name doesn't exist
column does not existColumn not found in the view
index does not existColumn is not indexed
permission deniedMissing ALTER MATERIALIZED VIEW permission (Enterprise)

See also