Poor read performance on get vertex after creating a new index


Tanroop Dhillon <dhillon...@...>
 

Hi,

I have a property ID on both my vertex and edge.
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");
}

try {
JanusGraphIndex edgeIndex = mgmt.buildIndex("byEdgeId", Edge.class).addKey(mgmt.getPropertyKey(
"ID")).buildCompositeIndex();
mgmt.setConsistency(edgeIndex, ConsistencyModifier.LOCK);
} catch (Exception e) {
log.info("Composite index: byEdgeId on Edge is already defined");
}

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