Skip to content

DELETE VERTEX

The DELETE VERTEX statement deletes vertices and the related incoming and outgoing edges of the vertices.

The 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.

Syntax

DELETE VERTEX <vid> [, <vid> ...];

Examples

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 serve.start_year == "2021" YIELD serve._dst AS id | DELETE VERTEX $-.id;

Nebula Graph traverses the incoming and outgoing edges related to the vertices and deletes them all. Then Nebula Graph deletes the vertices.

Caution

  • 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 --storage_client_timeout_ms in nebula-graphd.conf to extend the timeout period.

Last update: August 17, 2021
Back to top