0

For example in twitter how can we find path between person a to person b ? The query using repeat is recursive and can be very heavy on a big graph.how can i use olap for better performance?.or there is another way?

stephen mallette
  • 45,298
  • 5
  • 67
  • 135
sara
  • 11
  • 5

1 Answers1

0

One mechanism to mitigate the "heft" of this operation in OLTP mode, i.e. the potential full cluster/graph scan, is to use a time limit via Gremlin. The trade off though is that you may not find the path between the two vertices due to reaching the time limit.

OLAP would enable an operation likes this as it's designed to process "wide" traversals. Please note that 5.1 will have a lot of focus on performance improvements for full graph operations.

jlacefie
  • 614
  • 3
  • 5
  • Thanks, How can I translate the following OLTP query to OLAP query : g.V(ids).repeat(timeLimit(2000).bothE().otherV().simplePath()).times(5).emit(hasId(within(ids2)).where(hasId(within(ids2))).path() .limit(5) according to https://docs.datastax.com/en/latest-dse/datastax_enterprise/graph/graphAnalytics/northwindDemoGraphSnapshot.html : – sara Nov 17 '16 at 19:30
  • In "gremlin users" i got the answer : – sara Nov 18 '16 at 11:43
  • OLAP find path query is the same and without the timeLimit but tinkerpop3 has bug in the 3.2+ line: https://issues.apache.org/jira/browse/TINKERPOP-1559 – sara Nov 18 '16 at 11:45