Initially I has created a composite index on Vertex property = ID and read performance on get vertex by ID was very good. Then I created a composite index on edge property = ID. After this, get edge by ID is working great and get vertex by ID response time has drastically increased (from 50ms to 1 sec). Any help on this?
My code
try { JanusGraphIndex index = mgmt.buildIndex("byId", Vertex.class).addKey(mgmt.getPropertyKey("ID")).unique().buildCompositeIndex(); mgmt.setConsistency(index, ConsistencyModifier.LOCK); } catch (Exception e) { log.info("Composite index: byId on Vertex is already defined"); }