Search code examples
performancegraphorientdbbigdata

OrientDB Delete network BigData


I m using orientdb community version 2.2.20 . I have import a large dataset of for about 15M edges and 30K vertices What is the best way to delete a graph is it to delete edges , and then the vertices ? or is there a way to delete the whole graph at once?

Reading the documentation I only find the DELETE VERTEX, and EDGE commands


Solution

  • If you're deleting everything, you can use also the TRUNCATE CLASS command specifying also UNSAFE. That is much faster. Example to delete any vertices and edges in your database:

    TRUNCATE CLASS V POLYMORPHIC UNSAFE
    TRUNCATE CLASS E POLYMORPHIC UNSAFE