1

I have a gremlin query to fetch a few nodes that are related to a particular node. g.V('123').outE().otherV().has('label','secure')

The vertex with id 123 has at least 5000 nodes in its outE() with label secure Also the label property is an indexed property for that node type in the graph schema. This simple query takes 800ms to complete which is way too high compared to similar use cases in RDBMS.

Am I missing something here , or can someone help me optimize this more.

This is DSE 5.1.10, Any help is appreciated

Thanks

stephen mallette
  • 45,298
  • 5
  • 67
  • 135
zXor
  • 208
  • 1
  • 10
  • Have you checked `.profile()` to see if the index for `label` is getting used? I suspect it is not. – phact Sep 04 '18 at 13:57
  • Correct , index is not being used , but the field is indexed in the schema . Is it because of the g.V('123') ? g.V() shows use of the indexed field – zXor Sep 04 '18 at 14:15
  • what type of index is backing the label property? also, is it possible to post the .profile() step here? – jlacefie Sep 04 '18 at 15:22
  • @jlacefie So its a search index backing that property , And unfortunately the .profile() step's size is too big to post here , Anyway DSE graph step shows **usesIndex=false** And Many thanks for helping out – zXor Sep 04 '18 at 15:42
  • Could the label index go on the edge as a Vertex Centric Index? That way the index would get used by the query. – phact Sep 05 '18 at 18:14

0 Answers0