Adding a bunch of Vertices and edges takes for ever


yair...@...
 

I am writing an app that loads an existing RDBMS based graph implementation into JanusGraph.

I create this index:

        JanusGraphManagement mgmt = javaGraph.openManagement();
        if (mgmt.containsPropertyKey("nodeId")) {
            nodeId = mgmt.getPropertyKey("nodeId");
        } else {
            nodeId = mgmt.makePropertyKey("nodeId").dataType(Integer.class).make();
        }

        if(!mgmt.containsGraphIndex("nodeIdInd")){
            JanusGraphManagement.IndexBuilder nodeIdIndexBuilder = mgmt.buildIndex("nodeIdInd", Vertex.class).addKey(nodeId);
            nodeIdIndexBuilder.unique();
            JanusGraphIndex nodeIdIdx = nodeIdIndexBuilder.buildCompositeIndex();
        }


        mgmt.commit();


Creating the vertices and edges (~6K vertices and ~40K edges) takes a very long time.

Am I missing something?





Join janusgraph-users@lists.lfaidata.foundation to automatically receive all group messages.