DROP INDEX

Drops a row-level index from a Delta table. The child index Delta table is tombstoned at the current version.

Category: indexingDeltaForge extension

Syntax

DROP INDEX [IF EXISTS] <name> ON TABLE <table>

Description

## Overview DROP INDEX removes a row-level index from a Delta table. The index definition is removed from the parent's index registry and the child index Delta table is tombstoned in place rather than physically deleted, so time-travel reads at older parent versions continue to see the index. ## Behavior - The drop is recorded as a new commit on the parent table. The parent's version advances by one. - The child index Delta table at `<parent_path>/_delta_indexes/<index_id>` is not removed from storage. A subsequent VACUUM on the child path reclaims the space, but the standard parent-table VACUUM does not touch it. - IF EXISTS makes the drop idempotent. Without it, dropping a non-existent index raises an error. - Once dropped, query planning reverts to scanning the parent table for predicates the index used to serve. There is no automatic fallback to other indexes; the planner picks among the indexes that still exist. ## 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 lifecycle. ## Compatibility DeltaForge extension. The Delta Lake protocol has no native row-index concept; DROP INDEX manages a sibling Delta table that DeltaForge writes alongside the parent.

Parameters

NameTypeDescription
nameSpecifies the index name to drop. Must match the name supplied at CREATE INDEX.
tableSpecifies the parent Delta table that owns the index.
if_existsSkip the operation silently when no index with that name exists on the table.

Examples

-- Drop a known index
DROP INDEX idx_customer ON TABLE orders;
-- Idempotent drop that succeeds when the index does not exist
DROP INDEX IF EXISTS idx_customer ON TABLE orders;

Pitfalls

See Also

Open in interactive docs →   DeltaForge home →