DROP INDEX
Generic Description
Drop a named index.
Simple example:
DROP INDEX idx_person_name
Consumer-Level Explanation
Use DROP INDEX when the query must drop a named index and the planner needs to see that operation as part of the Cypher row pipeline. Keep the clause explicit because it controls row grain, variable scope, and what later clauses are allowed to reference.
More Detailed Explanation
DROP INDEX is usually a cleanup or migration step. It matters when an index no longer reflects real workload value or when a schema/index strategy is being reworked.
What this clause is really for:
- it defines one concrete stage in the Cypher row pipeline, so variables available before and after
DROP INDEXmust be clear - it should make graph structure, temporal filters, document payload shaping, or procedure output explicit instead of relying on client-side interpretation
- planner tooling depends on this clause boundary to know row grain, variable scope, and whether later expressions are reads, writes, schema operations, or projections
Advanced Example
This example keeps DROP INDEX inside a complete query pipeline so the clause boundary, visible variables, and returned row shape are clear to planner tooling.
SHOW INDEXES
Real Use Cases
- retiring obsolete indexes
- simplifying index inventory
- schema migration cleanup
Real Limitations And Tradeoffs
- dropping a useful index can create sudden regressions
- index dependencies should be understood before removal
- operational windows may matter for heavy index changes