DELETE VERTEX statement deletes vertices and the related incoming and outgoing edges of the vertices.
DELETE VERTEX statement deletes one vertex or multiple vertices at a time. You can use
DELETE VERTEX together with pipes. For more information about pipe, see Pipe operator.
DELETE VERTEXdeletes vertices and related edges directly.
DELETE TAGdeletes a tag with the given name on a specified vertex. When a vertex has only one tag,
DELETE TAGdeletes the vertex and keeps the related edges.
DELETE VERTEX <vid> [, <vid> ...];
This query deletes the vertex whose ID is "team1".
nebula> DELETE VERTEX "team1";
This query shows that you can use
DELETE VERTEX together with pipe to delete vertices.
nebula> GO FROM "player100" OVER serve WHERE properties(edge).start_year == "2021" YIELD dst(edge) AS id | DELETE VERTEX $-.id;
Delete the process and the related edges¶
Nebula Graph traverses the incoming and outgoing edges related to the vertices and deletes them all. Then Nebula Graph deletes the vertices.
- Atomic deletion is not supported during the entire process for now. Please retry when a failure occurs to avoid partial deletion, which will cause pendent edges.
- Deleting a supernode takes a lot of time. To avoid connection timeout before the deletion is complete, you can modify the parameter
nebula-graphd.confto extend the timeout period.